Free online tools to generate, calculate,
convert, format, encode, and play.
 

Merkle Tree Visualizer

Build and visualize a Merkle tree from a list of data inputs. Generate inclusion proofs and verify data integrity.


Input Data

Enter one data item per line (minimum 2)

Verify Proof

The original data to verify
The Merkle root hash to verify against
The inclusion proof array

Presets


How It Works

A Merkle tree (or hash tree) is a binary tree where every leaf node contains the hash of a data block and every internal node contains the hash of its two children concatenated together. The topmost node is called the Merkle root.

Parent Hash = SHA-256( Left Child || Right Child )

Merkle trees are fundamental to blockchains like Bitcoin and Ethereum, where they allow efficient verification that a transaction is included in a block without downloading the entire block.

Building the Tree

  1. Hash each data block — Each input is hashed with SHA-256 to form a leaf node.
  2. Pair and hash — Adjacent leaf hashes are concatenated and hashed to form parent nodes.
  3. Handle odd counts — If a level has an odd number of nodes, the last node is duplicated.
  4. Repeat — Continue pairing and hashing until a single root hash remains.

Inclusion Proofs

A Merkle proof lets you verify that a specific piece of data is part of the tree using only O(log n) hashes instead of checking every element. The proof consists of sibling hashes along the path from the leaf to the root.

To verify, start with the leaf hash and iteratively combine it with each proof step’s sibling hash (respecting left/right order) until you reconstruct the root. If the computed root matches the expected root, the data is verified.

Properties

Property Value
Hash AlgorithmSHA-256
Proof SizeO(log n) hashes
Verification TimeO(log n)
Tree Heightceil(log2(n))
Tamper DetectionAny change in data changes the root hash

Applications

  • Bitcoin — Transaction Merkle trees in each block header enable SPV (Simplified Payment Verification).
  • Ethereum — Uses modified Merkle Patricia tries for state, transactions, and receipts.
  • Git — Content-addressable storage uses a similar hash tree structure.
  • Certificate Transparency — Merkle trees provide append-only logs for TLS certificates.


Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with