Skip to content
Basis Desk

New: Basis Desk Verify for Chrome & Firefox — fact-check crypto news on any page, free.Get the extension →

Tech & Protocols · 5 min read Last reviewed November 7, 2026

What Are Merkle Trees? How Blockchains Summarize Transactions

Merkle trees use cryptographic hashes to condense thousands of transactions into a single data point, enabling light clients to verify network activity without downloading entire blockchains.

Editorial oversight: Julian Mercer, Chief Editor
Neutral

Key points

  • Merkle trees organize blockchain transactions by repeatedly hashing pairs of data until a single root hash is produced.
  • The Merkle root acts as a cryptographic fingerprint for all transactions included in a specific block.
  • Light clients use Merkle proofs to verify individual transactions without downloading the entire blockchain.
  • Centralized exchanges use Merkle trees for Proof of Reserves, allowing users to verify their deposits.

A Merkle tree is a fundamental data structure in cryptography that summarizes large sets of data into a single, verifiable string of characters known as a root. In blockchain networks like Bitcoin ($BTC) and Ethereum ($ETH), these trees organize transactions within a block, allowing network participants to prove that a specific transaction exists without needing to download the entire history of the network.

The Role of Cryptographic Hash Functions

To understand Merkle trees, one must first understand the cryptographic hash function. A hash function takes an input of any size—such as a text file, a digital image, or a transaction record—and processes it through a mathematical algorithm to produce a fixed-size output, known as a hash. Bitcoin uses the SHA-256 algorithm, which always produces a 64-character hexadecimal string regardless of the input data size.

Hash functions possess distinct properties that make them useful for data verification. They are deterministic, meaning the same input always yields the exact same output. They are also collision-resistant, meaning it is mathematically infeasible for two different inputs to produce the same hash. Finally, even a microscopic change to the input data completely alters the resulting hash. This cascading change, known as the avalanche effect, guarantees that tampered data is immediately obvious to anyone verifying the hash.

Constructing a Merkle Tree

A Merkle tree is built from the bottom up, starting with the raw data—in this case, individual blockchain transactions. Each transaction is passed through a hash function to create a "leaf node."

If a block contains four transactions (labeled A, B, C, and D), the system hashes each one to produce Hash A, Hash B, Hash C, and Hash D. The tree structure is binary, meaning nodes are paired together. Hash A and Hash B are concatenated and hashed together to form a new "branch node" (Hash AB). Simultaneously, Hash C and Hash D are combined and hashed to form Hash CD.

Finally, the two branch nodes (Hash AB and Hash CD) are combined and hashed to produce the Merkle root (Hash ABCD). This single 64-character string sits at the top of the tree and cryptographically represents all four underlying transactions.

If a block contains an odd number of transactions, the final transaction is duplicated and hashed with itself to ensure the binary pairing continues up the tree.

Worked Example: Verifying a Transaction

The primary utility of a Merkle tree is efficient data verification. Suppose a user wants to prove that Transaction C exists in the block described above, without revealing or downloading the other transactions.

To verify Transaction C, the user only needs three pieces of information: the transaction itself, Hash D, and Hash AB.

  1. The user hashes Transaction C to get Hash C.
  2. The user combines Hash C with the provided Hash D to calculate Hash CD.
  3. The user combines their calculated Hash CD with the provided Hash AB to calculate the Merkle root.

If the calculated root matches the official root broadcast in the block header, the user knows with absolute mathematical certainty that Transaction C is valid and included in the block. This process is called a Merkle proof. In a block containing 4,000 transactions, a complete list of hashes would require 4,000 entries. A Merkle proof for that same block requires only 12 hashes, reducing the data requirement exponentially.

Light Clients and Simplified Payment Verification

Merkle trees make decentralized networks accessible to users who cannot run full nodes. A full node downloads and verifies every block and transaction in the blockchain, which requires hundreds of gigabytes of storage space. Mobile phones and browser extensions lack the capacity for this.

Instead, lightweight applications run as "light clients." A light client only downloads block headers. In Bitcoin, a block header is a tiny 80-byte piece of data that includes the block's timestamp, the previous block's hash, and the Merkle root. When a light client wallet needs to verify that it received a payment, it requests a Merkle proof from a full node.

This system, detailed in the original Bitcoin whitepaper, is called Simplified Payment Verification (SPV). It allows users to verify their own transactions securely without trusting a third party, relying entirely on the cryptographic assurance provided by the Merkle root. For further context on how wallets manage keys alongside these verification structures, see our explainer on HD Wallets and Derivation Paths, Explained.

Proof of Reserves in Centralized Exchanges

Beyond base-layer blockchain architecture, Merkle trees are utilized by centralized cryptocurrency exchanges to perform Proof of Reserves (PoR) audits. A PoR audit attempts to cryptographically prove that an institution holds enough digital assets to cover all customer deposits.

In a PoR Merkle tree, each leaf node represents an individual customer's account balance and unique identifier. These balances are hashed and paired up the tree until they form a single Merkle root. The exchange publishes this root along with digital signatures proving ownership of the on-chain wallets containing the funds.

Individual customers can then use a Merkle proof to verify that their specific account balance was included in the final tree. If their balance is present and the total assets in the exchange's wallets match or exceed the sum of the liabilities represented by the tree, the exchange is considered solvent. While PoR does not account for hidden liabilities or off-chain debt, it provides a cryptographic baseline for asset verification.

Common Misconceptions

  • Merkle trees encrypt data: Merkle trees do not encrypt information; they hash it. Hashing is a one-way process used to verify data integrity, whereas encryption is a two-way process designed to hide data and allow it to be decrypted later with a key.
  • Light clients are as secure as full nodes: While SPV provides strong assurances that a transaction exists in a block, light clients cannot independently verify the rules of the network (such as checking if miners are creating too many new coins). They assume that the longest chain of block headers is valid, which introduces a slight trust assumption regarding the full nodes supplying the data.
  • Proof of Reserves guarantees an exchange is safe: A Merkle tree-based PoR only proves that the exchange controlled certain on-chain assets at the exact moment the snapshot was taken. It does not prove that the exchange has exclusive control over the keys, nor does it prove the absence of corporate debt or other off-chain liabilities.

How This Connects to the Market

The efficiency of Merkle trees is a driving force behind blockchain scaling solutions and market accessibility. Without the ability to compress transaction data into a single root, mobile wallets and decentralized finance (DeFi) interfaces would be impossible to run on consumer hardware. Every user would need to operate a data center just to verify a simple transfer.

Furthermore, the evolution of this technology continues to influence market infrastructure. Zero-knowledge rollups and other Layer-2 networks rely heavily on advanced variants of Merkle trees to bundle thousands of transactions off-chain and submit a single cryptographic proof to the main network. This architecture dictates network transaction fees, settlement times, and the operational costs for institutional infrastructure providers. As developers propose new standards—such as those discussed in Bitcoin Developers Propose BIP 360 to Mitigate Long-Exposure Quantum Vulnerabilities—the underlying hash functions securing these trees remain a critical focal point for network stability and institutional adoption.

Questions this story raises

What happens if one transaction in a Merkle tree is altered?
Because cryptographic hash functions exhibit the avalanche effect, altering even a single character in one transaction will change its hash. This change will cascade up the tree, resulting in a completely different Merkle root.
Why are they called Merkle trees?
The data structure is named after Ralph Merkle, the computer scientist who patented the concept of hash trees in 1979.
Do all blockchains use Merkle trees?
The vast majority of blockchains, including Bitcoin and Ethereum, use Merkle trees or advanced variations (like Ethereum's Merkle Patricia Trie) to structure block data efficiently.
What is SPV?
Simplified Payment Verification (SPV) is a method described in the Bitcoin whitepaper that allows a user to verify their transactions by checking a Merkle proof against block headers, without downloading full blocks.

References

  1. [1] Bitcoin Developer Reference: Block Headers — Bitcoin.org
  2. [2] Bitcoin: A Peer-to-Peer Electronic Cash System — Bitcoin.org
  3. [3] Ethereum Documentation: Merkle Patricia Trie — Ethereum Foundation

Evergreen explainer written by Basis Desk's system and checked by an independent model pass for factual errors and advice language. Figures, fees and rules change — the references above are where to verify current specifics. Market figures marked "at the time of writing" come from live exchange data. Report an error: corrections@basisdesk.news · corrections policy.

The Daily Brief, in your inbox at 07:00 ET

Five stories, the numbers that moved, what to watch. Three minutes. No hype, no advice, unsubscribe in one click.

Not financial advice. Basis Desk publishes information, not recommendations. Crypto assets are volatile and you can lose what you invest.