Atlas21
  • ‎
No Result
View All Result
Atlas21
No Result
View All Result
Atlas21
Home Learn

What is a Merkle Tree?

Newsroom by Newsroom
June 10, 2026
in Learn
merkle tree
Share on FacebookShare on TwitterShare on Linkedin
Advanced Bitcoin Guide

TL;DR: A Merkle tree is a tree data structure that summarizes a large set of data into a single hash, called the Merkle root. In Bitcoin, every block contains a Merkle tree that summarizes all the block’s transactions: the Merkle root occupies 32 bytes of the block header (80 bytes total). This structure makes it possible to prove that a transaction is included in a block with just a few hundred bytes, without downloading the entire block. The concept was described by Ralph Merkle, who patented it in 1979.

A Merkle tree (or hash tree) is a tree data structure used to efficiently summarize and verify the integrity of large sets of data. It is named after Ralph Merkle, the computer scientist who patented the concept in 1979.

In Bitcoin, the Merkle tree is a fundamental component: every block in the blockchain contains one, organizing all of the block’s transactions and summarizing them into a single 32-byte hash known as the Merkle root.

What is a Merkle tree?

A Merkle tree is a binary tree built using hash functions. The “leaves” at the base of the tree are the hashes of individual pieces of data (in Bitcoin, transaction identifiers). Each higher level is obtained by concatenating pairs of hashes from the level below and computing the hash of the result, until a single hash remains at the top: the Merkle root.

The advantages are twofold:

  • Compression: thousands of transactions are represented by a single 32-byte hash.
  • Verifiability: proving that a piece of data belongs to the set requires only a small number of intermediate hashes (the Merkle proof), without transmitting the entire dataset.

If even a single bit of a transaction changes, its hash changes, all intermediate hashes along the path change, and the Merkle root changes: any tampering is immediately detectable.

How does a Merkle tree work? A step-by-step example

Imagine a block with four transactions: A, B, C, and D.

  1. The hash of each transaction is computed: H(A), H(B), H(C), H(D). In Bitcoin, the function used is SHA-256 applied twice (double SHA-256).
  2. The hashes are paired and the hash of each pair is computed: H(AB) = hash of H(A)+H(B); H(CD) = hash of H(C)+H(D).
  3. The process is repeated on the final level: the Merkle root is the hash of H(AB)+H(CD).

To prove that transaction C is included in the block, only two hashes are needed: H(D) and H(AB). The verifier computes H(C), combines it with H(D) to obtain H(CD), combines H(CD) with H(AB), and checks that the result matches the Merkle root in the block header. This path is called a Merkle proof (or Merkle path).

The number of hashes required grows logarithmically: for a block with over 2,000 transactions, roughly 11–12 hashes suffice — just a few hundred bytes. If the number of transactions is odd, the last hash is duplicated and paired with itself.

How Bitcoin uses the Merkle tree

The Merkle root in the block header

Every Bitcoin block consists of an 80-byte header and a body containing the transactions. The header includes six fields: the version, the hash of the previous block, the Merkle root, the timestamp, the difficulty target, and the nonce.

The Merkle root is therefore the only “summary” of the transactions that enters the block header. When miners search for a valid hash for the block, they work solely on the 80-byte header: the Merkle root ensures that header is cryptographically bound to the exact list of included transactions. Altering a transaction after the fact would require recalculating the Merkle root and redoing the proof of work for that block and all subsequent blocks.

SPV and Merkle proof: verifying without downloading everything

The Merkle tree is what makes Simplified Payment Verification (SPV) possible, as described by Satoshi Nakamoto in section 8 of the Bitcoin whitepaper. An SPV client (such as many mobile wallets) does not download the entire blockchain: it downloads only the block headers, 80 bytes each.

To verify that a payment has been received, the client requests a Merkle proof from a full node: a handful of hashes linking the transaction to the Merkle root of a header it already holds. If the path checks out, the transaction is confirmed as included in that block, and subsequently mined blocks confirm its depth. All of this without downloading and validating hundreds of gigabytes of data.

Where are Merkle trees used beyond Bitcoin?

Merkle trees are used in a variety of applications, including:

  • File systems: used to verify the integrity of files within distributed file systems such as the InterPlanetary File System (IPFS).
  • Database systems: used to detect inconsistencies among replicas of entire NoSQL databases such as Apache Cassandra and Amazon DynamoDB.
  • Version control systems: some of the most widely used version control systems, such as Git and Mercurial, use Merkle trees to manage versions of files and directories.

Frequently asked questions

What is the Merkle root?

It is the hash at the top of the Merkle tree, summarizing all of a block’s transactions into 32 bytes. In Bitcoin, it is one of the six fields in the block header.

Who invented the Merkle tree?

American computer scientist Ralph Merkle, who patented the concept in 1979. The structure predates Bitcoin and is used in many other systems.

What is the Merkle tree used for in Bitcoin?

It cryptographically binds the list of transactions to the block header and makes it possible to prove the inclusion of a transaction using a Merkle proof, without transmitting the entire block.

What is a Merkle proof?

It is the set of intermediate hashes that links a transaction to the Merkle root. For a block with thousands of transactions, around a dozen hashes are sufficient.

What does SPV stand for?

Simplified Payment Verification: the method, described in the Bitcoin whitepaper, by which a lightweight wallet verifies payments by downloading only block headers and requesting Merkle proofs from full nodes.

Want to learn more?

This article is part of our comprehensive guide.

Read the full guide
Previous Post

No FTX relaunch: the exchange promises full refunds to customers

Next Post

The United States will collect data on the electricity usage of miners

Latest News

Ledn: il mercato del lending in Bitcoin potrebbe raggiungere $1000 miliardi
Bitcoin

Ledn: Bitcoin lending market could reach $1 trillion

by Newsroom
June 17, 2026
0

Ledn's co-founder bets on securitization of Bitcoin-backed loans to attract institutional capital at scale.

Read moreDetails
USA: accordo su housing bill include divieto di CBDC fino al 2030
Bitcoin

USA: housing bill agreement includes CBDC ban until 2030

by Newsroom
June 17, 2026
0

The U.S. House and Senate have reached a deal on the 21st Century Road to Housing Act, which prohibits the...

Read moreDetails
Binance: la Grecia starebbe per respingere la licenza MiCA, a rischio la permanenza in UE
Bitcoin

Binance: Greece reportedly set to reject MiCA license, EU presence at risk

by Newsroom
June 16, 2026
0

The Hellenic Capital Market Commission is reportedly ready to reject Binance's MiCA license application, shutting the largest exchange out of...

Read moreDetails
South Korea: $11 million USDT laundering ring dismantled
Bitcoin

South Korea: $11 million USDT laundering ring dismantled

by Newsroom
June 16, 2026
0

Seoul police arrested 56 people linked to a Cambodian criminal organization that laundered phishing and romance scam proceeds through Tether.

Read moreDetails
From above of crop banknote of European Union placed on table with dollars
Bitcoin

ECB: Lagarde pushes for digital euro against dollar stablecoins

by Newsroom
June 16, 2026
0

ECB President Christine Lagarde defends the digital euro as the only credible response to the growing dominance of dollar-pegged stablecoins.

Read moreDetails
Atlas21

© 2026 Atlas21

Navigate Site

  • Editorial Policy
  • Cookie Policy
  • Privacy Policy
  • Team

Follow Us

No Result
View All Result
  • Bitcoin 101
    • What Is Bitcoin? A Complete Guide
    • Bitcoin Security: A Complete Guide
    • Bitcoin Privacy: A Complete Guide
    • Lightning Network: A Complete Guide
    • Bitcoin Mining: A Complete Guide
    • Advanced Bitcoin: A Technical Guide
  • Learn
  • Latest News
  • Interviews
  • Opinion
  • Feature
  • B2B Services
  • About Us
  • Contacts

© 2026 Atlas21

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site, we will assume that you are happy with it.