Merkle Tree

Build a Merkle tree over leaves; show hashes and how flipping a leaf changes the root.

About this tool

Merkle Tree hashes leaves pairwise to one root. When the number of leaves is not a power of two, this tool duplicates the final leaf until it is; padded leaves are labelled in the tree. Changing a selected leaf changes only its ancestor path and the root.

After every build the tool derives and verifies the selected leaf’s authentication proof against the displayed root. The proof records each sibling hash and whether it is left or right; changing either the leaf or a proof hash makes verification fail. SHA-256 is used when Web Crypto is available; FNV-1a is only an educational fallback.