Tidak suka iklan? Pergi Bebas Iklan Hari ini

Merkle Tree Generator & Visualizer

DataPengembangKeamanan
IKLAN · HAPUS?
[iotools_merkle_tree_generator]
IKLAN · HAPUS?

Memandu

Merkle Tree Generator & Visualizer

Merkle Tree Generator & Visualizer

Paste a list of values, choose a hash function, and instantly see a visual Merkle tree with every intermediate node hash and the final Merkle root. Pick SHA-256, SHA-1, or Keccak-256 (the hash Ethereum uses), tune the Bitcoin-style odd-leaf rule or the OpenZeppelin sorted-pair convention, and export the full tree as JSON. Click any node in the diagram to copy its hash to the clipboard.

Cara Penggunaan

  1. Enter your leaves in the textarea, one value per line. Try the example button for a quick sample set.
  2. Pick a hash function: SHA-256 for general use, SHA-1 for legacy systems, or Keccak-256 for Ethereum-compatible roots.
  3. Choose how each line should be interpreted: as UTF-8 text (default) or as an already-hashed hex string.
  4. Select an odd-leaf rule and a pair-concatenation mode that matches the protocol you are targeting.
  5. Read the Merkle root, scroll the SVG diagram, and download the JSON export for downstream tooling.

Fitur

  • Three hash functions – SHA-256, SHA-1, and Keccak-256 cover the common Bitcoin, legacy, and Ethereum use cases.
  • Interactive SVG diagram – Every node is click-to-copy; duplicated phantom siblings are drawn with a dashed border so the structure is honest.
  • Odd-leaf strategies – Toggle between duplicate-last (Bitcoin convention) and promote-last (carry the unpaired node up untouched) to match your target protocol.
  • Sorted-pair mode – Switch on the OpenZeppelin-style sorted concatenation when you need roots that are compatible with the popular Solidity MerkleProof library.
  • Pre-hashed hex input – Skip leaf hashing entirely by pasting hex digests directly, useful when the underlying leaves are large or already canonicalised.
  • JSON export – Download a full snapshot of every level, every node hash, and the chosen parameters for reproducibility.

Tanya Jawab Umum

  1. What is a Merkle tree?

    A Merkle tree is a binary tree of cryptographic hashes. The leaves are hashes of the input data, and every parent node is the hash of the concatenation of its two children. The single hash at the top — the Merkle root — fingerprints the entire data set: change any leaf and the root changes. Merkle trees let you prove that a specific value belongs to a set by sharing only a logarithmic number of sibling hashes (the Merkle proof), which is why they power Bitcoin block headers, Ethereum state, Git commits, and Certificate Transparency logs.

  2. Why does Bitcoin duplicate the last hash when a level has an odd number of nodes?

    To keep the construction strictly binary, Bitcoin pads odd-numbered levels by duplicating the rightmost hash so it can be paired with itself. This is simple to implement but introduces a well-known second-preimage quirk (CVE-2012-2459) where an attacker can sometimes craft a different leaf list that produces the same root. Newer designs prefer a 'promote' rule — carrying the unpaired hash up unchanged — or domain-separation tags on internal vs. leaf hashes to close the gap.

  3. How is Keccak-256 different from SHA-256 and SHA3-256?

    Keccak-256 is the original sponge construction that won the NIST SHA-3 competition. Before standardisation, NIST changed the padding rule, producing SHA3-256, which is incompatible byte-for-byte with the pre-standardisation Keccak-256. Ethereum locked in the original Keccak-256 before the change, so 'keccak256' in Solidity is not the same function as SHA3-256. SHA-256 is part of the unrelated SHA-2 family and uses a Merkle–Damgård construction; it shares only the name pattern.

  4. Why do some Merkle libraries sort the pair before hashing?

    Sorting the left and right hashes before concatenation makes the parent hash independent of which child is 'left' and which is 'right.' This means a Merkle proof only needs to include sibling hashes, not directional bits, which makes proofs about 30% smaller on chain and the verifier contract much simpler. OpenZeppelin's MerkleProof.sol uses this convention; classic Bitcoin and Ethereum block headers do not. The sorted variant is mostly seen in airdrop allowlists, governance snapshots, and other off-chain commitments.

Ingin bebas iklan? Bebas Iklan Hari Ini

Instal Ekstensi Kami

Tambahkan alat IO ke browser favorit Anda untuk akses instan dan pencarian lebih cepat

Ke Ekstensi Chrome Ke Ekstensi Tepi Ke Ekstensi Firefox Ke Ekstensi Opera

Papan Skor Telah Tiba!

Papan Skor adalah cara yang menyenangkan untuk melacak permainan Anda, semua data disimpan di browser Anda. Lebih banyak fitur akan segera hadir!

IKLAN · HAPUS?
IKLAN · HAPUS?
IKLAN · HAPUS?

Pojok Berita dengan Sorotan Teknologi

Terlibat

Bantu kami untuk terus menyediakan alat gratis yang berharga

Belikan aku kopi
IKLAN · HAPUS?