Merkle Trees Explained Simply
A Merkle tree explained simply: how hashes are paired into a single root, how Merkle proofs work, and why Bitcoin, Ethereum and proof of reserves rely on them.
A Merkle tree is a data structure that repeatedly hashes pairs of data together until a whole set of information is summarized in one short fingerprint, the Merkle root, which makes it possible to prove any single item belongs to the set with just a handful of hashes. Blockchains use Merkle trees to commit to thousands of transactions compactly and to let light wallets verify payments without downloading everything.
You do not need to understand the math to use crypto, but Merkle trees explain several things investors encounter: why light wallets can be trusted to a degree, how airdrop claims work and what an exchange's "proof of reserves" actually proves.
A Plain-Language Analogy
Imagine a tournament bracket. Players compete in pairs, winners move up, and eventually one champion remains. To prove a specific player was in the tournament, you do not need the entire bracket; you only need the path from that player to the final, plus the opponents along the way.
A Merkle tree works the same way, except that instead of "winners," each level combines two hashes into a new hash. The "champion" at the top is the Merkle root. To prove an item is included, you only need the hashes along its path.
How a Merkle Tree Is Built, Step by Step
First, a quick definition: a hash function turns any data into a fixed-length fingerprint. The same input always gives the same output, and changing even one character gives a completely different result.
- 1Hash each item. Suppose you have four transactions: A, B, C and D. Compute hash(A), hash(B), hash(C) and hash(D). These are the "leaves."
- 2Pair and hash. Combine hash(A) with hash(B) and hash the result to get AB. Do the same with C and D to get CD.
- 3Repeat. Combine AB and CD and hash them to get the root, ABCD.
- 4Handle odd numbers. If a level has an odd number of hashes, a common approach (used by Bitcoin) is to duplicate the last one so it can be paired.
The root, ABCD, now depends on every transaction. Alter transaction C and its hash changes, which changes CD, which changes the root.
How Merkle Proofs Work
To prove transaction C is in the set, you provide:
- hash(D), its sibling at the bottom level, and
- AB, the sibling at the next level up.
The verifier hashes C, combines it with hash(D) to get CD, then combines AB with CD to get the root. If that matches the trusted root, C is included.
The power is in scale. As a hypothetical example, a tree of around one million items has about 20 levels, so a proof needs only about 20 hashes. Doubling the number of items adds just one more hash to the proof.
| Number of items (illustrative) | Approximate hashes in a proof |
|---|---|
| 4 | 2 |
| 1,000 | 10 |
| 1,000,000 | 20 |
Where Merkle Trees Appear in Crypto
Bitcoin Blocks and Light Wallets
Every Bitcoin block header contains the Merkle root of the block's transactions. The Bitcoin whitepaper describes "simplified payment verification" (SPV): a light client keeps only block headers and asks for a Merkle proof that a transaction is in a block. This lets mobile wallets verify inclusion without storing the full blockchain, though they still rely on the assumption that the longest valid chain is honest.
Ethereum State
Ethereum uses a variation called the Merkle Patricia trie to commit to account balances, contract code and storage. Block headers include roots for the state, transactions and receipts, which allows proofs about specific accounts or events.
Airdrops and Allowlists
Many token airdrops publish only a Merkle root on-chain. Each eligible wallet receives a proof, and the claim contract checks it. This saves large amounts of gas compared with storing every address on-chain.
Proof of Reserves
Some exchanges publish a Merkle tree of customer balances so each user can verify their balance was included in the total liabilities. This is useful, but it shows only part of the picture: it does not prove the exchange has enough assets, or that it has no hidden debts.
Why It Matters for Investors
- Verification instead of trust. Merkle trees are one reason blockchains can be checked by anyone, not just the operator.
- Understanding light wallets. A light wallet verifying a Merkle proof is safer than one that blindly trusts a server, but less independent than running a full node.
- Reading proof-of-reserves claims critically. A Merkle tree proves inclusion, not solvency.
- Spotting airdrop scams. Legitimate claims check a proof on-chain through an official site; fake "claim" pages often ask for broad approvals instead. See how to use a block explorer to inspect claim contracts.
Common Misconceptions
- "The Merkle root encrypts the data." Hashing is not encryption; the root does not hide or store the data, it fingerprints it.
- "A Merkle proof proves a transaction is valid." It proves inclusion in a set, not that the transaction followed all the rules.
- "Proof of reserves means an exchange is safe." It only covers what was included and what assets were shown at one moment.
- "Merkle trees are unique to crypto." They were described by Ralph Merkle decades before Bitcoin and are also used in file systems and software version control.
For related concepts, see our explainer on zero-knowledge proofs and the crypto glossary.
Bottom line
A Merkle tree compresses a large set of data into one root hash and lets anyone prove a single item is included with a short proof. That simple idea underpins Bitcoin block headers, light wallets, Ethereum's state, airdrop claims and proof-of-reserves systems. Knowing what a Merkle proof does, and does not, prove helps you judge those systems more clearly.
Frequently asked questions
What is a Merkle tree in simple terms?
A Merkle tree is a way of summarizing a large set of data into a single short fingerprint called the Merkle root. Each piece of data is hashed, then hashes are paired and hashed again, level by level, until one hash remains. If any piece of data changes, the root changes, so the root can be used to check the whole set.
What is a Merkle proof?
A Merkle proof is a short list of hashes that shows a specific item is included in a set summarized by a Merkle root. By hashing the item together with the provided sibling hashes, you can recompute the root. If it matches the published root, the item is included, without needing to download the whole dataset.
Why does Bitcoin use Merkle trees?
Each Bitcoin block header contains the Merkle root of all transactions in that block. This lets the header commit to every transaction in a compact way, and it lets lightweight wallets confirm that a transaction is in a block using a small proof instead of downloading the full block, as described in the Bitcoin whitepaper.
How are Merkle trees used in proof of reserves?
Some exchanges publish a Merkle root built from customer balances. Each customer can receive a proof showing their balance was included in the total. This helps show liabilities were counted, but it does not prove the exchange has no other debts, so it is only part of a full picture of solvency.
