Interactive demonstration of blockchain immutability through cryptographic hash chaining
Each block in a blockchain contains the cryptographic hash of the previous block. This creates an unbreakable chain where modifying any past block invalidates all subsequent blocks.
A new block is created containing:
All block contents are combined and run through SHA-256 to create a unique 64-character hash:
a3f29c8...d4e7b1
This hash becomes the block's unique fingerprint.
The next block stores this hash as its "Previous Hash" field, creating the link:
Block #2.previousHash = Block #1.hash
This chains the blocks together cryptographically.
π Why This Matters: If someone tries to change data in Block #1, its hash changes. But Block #2 still has the OLD hash stored. This mismatch is instantly detectable, proving tampering occurred!
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Block #0 β β Block #1 β β Block #2 β
β β β β β β
β Data: Gen β β Data: TX1 β β Data: TX2 β
β PrevHash: 0 βββββββΆβ PrevHash: a3βββββββΆβ PrevHash: 7fβ
β Hash: a3f2..β β Hash: 7f8e..β β Hash: c2b9..β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β² β²
βββββββββββββββββββββββ
Each block's hash becomes
the next block's "Previous Hash"
A blockchain is a chain of blocks where each block contains data and is cryptographically linked to the previous block. This creates an immutable ledger where tampering with past data becomes mathematically detectable.
Each block stores the hash of the previous block, creating a cryptographic chain. If any past block is modified, all subsequent hashes become invalid.
Each block is hashed using SHA-256, a cryptographic hash function. Even a tiny change in data produces a completely different hash.
Once data is added to the blockchain, it cannot be altered without breaking the chain. This makes blockchains tamper-evident and secure.
Anyone can verify the chain's integrity by recalculating each block's hash and checking that it matches the stored hash.
Try This: Add several blocks to your chain, then use the "Tamper Block" button on any block. Run "Verify Chain" to see how changing one block invalidates the entire chain from that point forward!
Type these commands in the on-screen console:
chain new - Create new genesis blockchain add [data] - Add block to chainchain verify - Check chain integritychain export - Download chain as JSONchain import - Load saved chainchain stats - Show chain statisticsrain effect blocks - Trigger block formation animationrain effect mining - Show mining animationrain effect chain - Display chain linking effectInterested in diving deeper into blockchain technology? Check out these related topics: