Verification lab
What changes when you change the record? Edit the text yourself to explore hashes and the links between blocks.
Inputs are calculated only in this browser, without being saved or sent. Do not enter private keys or personal information.
Change one letter. What happens to the hash?
A hash is a fixed-length value calculated from an input. Here, text becomes UTF-8 bytes and is hashed once with SHA-256. The same input always produces the same result.
Reference input
Bitcoin
SHA-256 (64 hexadecimal digits)
b4056df6691f8dc72e56302ddad345d65fead3ead9299609a826e2344eb63aa4Start by making the B in “Bitcoin” lowercase. Spaces and line breaks are part of the input too.
SHA-256 (64 hexadecimal digits)
b4056df6691f8dc72e56302ddad345d65fead3ead9299609a826e2344eb63aa4The input matches the reference, so all 64 digits match.
Change an earlier record. What happens to the chain?
Each block hashes its text together with the previous block’s hash. Change A to A! and inspect the chain to find the mismatch with the reference stored in the next block.
Every reference matches. This checks only the links within this model.
Block 1
- Stored previous hash
0000000000000000000000000000000000000000000000000000000000000000- This block’s calculated hash
ee5a56d8291207c6c21ed6c7c9694e41651c023232bc60f654c0d77fb7fc1c29
Fixed starting value (64 zeros)
Block 2
- Stored previous hash
ee5a56d8291207c6c21ed6c7c9694e41651c023232bc60f654c0d77fb7fc1c29- This block’s calculated hash
de67a93b548c3f86e4e95b627a30564175b88029bc559b2a3be4431f696a6ce4
Previous block matches
Block 3
- Stored previous hash
de67a93b548c3f86e4e95b627a30564175b88029bc559b2a3be4431f696a6ce4- This block’s calculated hash
4ad350a24c372cc409a376695831cd39f27428c1416e8949d21256ad08b46ad9
Previous block matches
The last record has no successor referring to it yet. Editing only that record changes its hash but creates no reference mismatch within this chain.
See exactly what this model hashes
Each hash is a single SHA-256 of the UTF-8 representation of the following JSON array. JSON makes the field boundaries unambiguous. The first reference is 64 zeros. This is not Bitcoin block serialization.
["bitcoin-library-lab-v1", previousHash, text]What this shows. What it does not.
Linking hashes makes a past change show up in later references. But matching references and an accepted, valid history are different things.
- What is reproduced
- Real SHA-256 calculations and references to a previous hash, and nothing more. Hashing is not encryption or a digital signature.
- What is omitted
- Bitcoin’s 80-byte block header, double SHA-256, transactions and Merkle trees, digital signatures, proof of work, node validation, and consensus are not reproduced.
- What Bitcoin requires
- Actual nodes validate transaction and block rules. Replacing a past block requires redoing proof of work for it and its successors, and competing with the accumulated work of other valid chains.
Explore the mechanisms and original sources
Sources behind the experiment
- Bitcoin whitepaper — §§3–5
The original proposal for hash-linked records, proof of work, and transaction validation by nodes.
- Bitcoin Developer Reference — Block Headers
The 80-byte header format and the double-SHA-256 reference to the previous block.
- MDN — SubtleCrypto.digest()
Browser SHA-256 calculations, UTF-8 input, and the secure-context requirement.