Tool · Hashing

Merkle tree builder

Many transaction IDs become one 32-byte root

Merkle tree builder

Pair, hash, repeat: many txids become one 32-byte root

1fad76f4e6eccfa580d0001e2b764a4d1ff50558a96f7dd9a78bb18ced5063131fad76f4 coinbase01744c2b9431725b5169245d7b9057d421e6b5bf25fce05818cbaf08c164025f01744c2b tx 1dd6b8f7c597a5473d387379fee85e8d3e9d0a8510e9ec1209debcf1377dd2b57dd6b8f7c tx 24cb8ba415afc98591258733b427d15e19698bb48b850c07c8631fab3829db1b54cb8ba41 tx 375149cb026f2fb1b50f5cea1b4c8e3f03c1c36f8c678cbc05d83df8a9f0e0f2075149cb0 tx 455fd26a7a646df78abc30d4e1dcbb69b218ce2a5677e5465adab5e836a7b974255fd26a7 tx 5f8b682ac2145d11c8416349396156d0f2c2c52f9c91695506cd63902cb8da017f8b682ac83053c79d215153346e8041cfb72ecb6ffa16e3cb3df071b8cef433e9bd913a983053c79c78d3ee1342b1ef1506895314f5dec480faaf50a274a4d9c80567783b56f4b12c78d3ee15bbe61bf5b7102604ac22cfa42fa88c85b4883ba69fe4bee3600e5bda95a92245bbe61bfd989bdca710aaf29cf684945031191ee024376d754cf9cde35ae174e792636d2d989bdcac6c21c0c4204b9f39e17d7f79811aff53eac88ea0d80fcdeffdad96ba3fa8963c6c21c0c Merkle rootCopy of the last node (odd count)copy
Merkle root ✓ matches block 130,827’s header

c6c21c0c4204b9f39e17d7f79811aff53eac88ea0d80fcdeffdad96ba3fa8963

Proof for leaf 0 ✓ verifies

To prove leaf 0 is in the block, send these 3 hashes, not all 6 txids. Hash upward, putting each one on its side:

  1. start1fad76f4e6…506313
  2. me ‖ sibling 01744c2b94…64025f
  3. me ‖ sibling 83053c79d2…d913a9
  4. me ‖ sibling d989bdca71…2636d2
  5. = rootc6c21c0c42…fa8963
Leaves (txids) 6 of 16

Runs in your browser · nothing is sent src/lib/merkle.ts · SHA256d pairs, same as Bitcoin

What it does

The tree starts with the six real transaction IDs of mainnet block 130,827, and its root matches that block’s header. Switch to toy txids, edit any leaf, add or remove leaves (up to 16), and the tree redraws.

How to read it

  • Each node is SHA256d of the two nodes below it. The labels are the first few hex digits; click any node for its full hash and how it was made.
  • When a level has an odd number of nodes, the last one is paired with a copy of itself (the dashed box).
  • Click a leaf to see its inclusion proof: the violet path climbs to the root, and the amber boxes are the sibling hashes the proof must carry. A proof for one of 6 transactions needs 3 hashes, not all 6 txids.
  • Tamper with a leaf (the lightning button changes one hex digit): every hash on its path turns red up to the root, and the root no longer matches the header.

Pearl specifics

  • Same tree as Bitcoin: txids in internal byte order, SHA256d pairs, odd nodes duplicated. Hashes are shown byte-reversed, as explorers print them.
  • The root goes into the 108-byte header, so the block hash commits to every transaction. Change one and the header, the block hash and the link from the next block all break.

Under the hood

Runs entirely in your browser. Trees and proofs come from src/lib/merkle.ts. The six txids of block 130,827 come from the Pearl Blockbook, and the site’s build checks that they hash to the Merkle root in that block’s real header; the library’s unit tests cover single-leaf and odd-level trees.

Suggested

Up and down arrows move through the results, Enter opens one, Escape closes. Anywhere on the site, slash or Command K opens this search, and the square brackets [ and ] go to the previous and next page.