A Merkle tree hashes data blocks in pairs, repeatedly, until a single root hash remains. That one root — a few bytes — commits to every record beneath it: change a single byte anywhere in the dataset and the root changes too. This is how blockchains, Git, package managers and certificate transparency logs let you verify one record is included in a huge dataset without downloading the whole thing.
hash(record). Each internal node is hash(left child + right child), all the way up to the root.log₂(n) hashes for n leaves, not n.Ralph Merkle patented this structure in 1979. Bitcoin uses a Merkle tree of transactions so light clients can verify a transaction is in a block using only ~log₂(n) hashes instead of downloading every transaction — for a block with 2,048 transactions, that's just 11 hashes.
An interactive 3D binary tree of hashed data blocks. Selecting any leaf record highlights the minimal chain of sibling hashes needed to recompute the root and verify that record belongs to the dataset — without touching any other record.
Every internal node is the hash of its two children, all the way up to a single root hash. Proving a leaf's inclusion only requires the sibling hash at each level — log₂(n) hashes for n leaves — not the whole dataset.
Pick a leaf count and drag the leaf slider (or click a block) to select a record. Watch the cyan recomputed path and gold sibling hashes light up. Tamper with a leaf's data to see the root hash diverge from the trusted root.
Bitcoin block headers store only a Merkle root. A light client can verify a transaction is in a block containing thousands of others using roughly 11–12 hashes instead of downloading the entire block.