How Bitcoin Works

30 minutes 📝 Quiz included Interactive

Understanding the Machine Behind the Magic

You already know why Bitcoin matters—now let's uncover how it works. Don't worry, you won't need any coding knowledge. Everything here is visual, practical, and easy to grasp.

Bitcoin is built from three key innovations that work together seamlessly:

  1. The Blockchain — a shared public ledger
  2. Transactions — the rules for how value moves
  3. Mining — the system that secures and synchronizes everything

⚙️ Part 1: The Blockchain – Bitcoin's Memory

Think of the blockchain as a digital notebook where every page is glued to the next. Each page (block) records new Bitcoin transactions and references the one before it, creating an unbreakable chain.

Each block includes:

  • Transactions: Bitcoin transfers between users
  • Previous Block Hash: The unique fingerprint linking it to the past
  • Timestamp: When it was added
  • Nonce: A random number miners adjust to find a valid hash

Why this matters: If anyone tries to alter an old block, the hash changes and breaks the chain. The network instantly rejects it. This design makes Bitcoin's history tamper-evident and self-defending—no central authority needed.

📦 How Blocks Link Together

Block #100
Transactions: 2,500
Previous Hash:
00000a8c...
This Block Hash:
00000b3f...
Block #101
Transactions: 2,700
Previous Hash:
00000b3f...
This Block Hash:
00000c7d...
Block #102
Transactions: 3,100
Previous Hash:
00000c7d...
This Block Hash:
00000d9e...

Notice how each block's hash becomes the "Previous Hash" for the next block. This creates an unbreakable chain.

🔗 Interactive: Building the Chain

Build your own blockchain! Add transactions, mine blocks, and see what happens when you try to tamper with the chain.

Launch Building the Chain Demo →

Try adding blocks, then attempt to change an old transaction. Watch the cascade effect!

🚫 Interactive: Double-Spending Prevention

See how Bitcoin prevents the same coin from being spent twice using the blockchain. Try the attack in both scenarios!

Launch Double-Spending Demo →

Watch how traditional digital cash fails while Bitcoin's blockchain succeeds!

Part 2: Transactions – How Bitcoin Actually Moves

Bitcoin doesn't track balances like banks. It uses UTXOs—Unspent Transaction Outputs.

Think of them like bills in your wallet: you can't tear one in half, but you can combine or split them when spending.

Example:

Alice holds three UTXOs totaling 0.10 BTC.
She wants to send 0.07 BTC to Eve.

UTXO #1 0.05 BTC
UTXO #2 0.03 BTC
UTXO #3 0.02 BTC

Her wallet combines two UTXOs (0.05 + 0.03), sends 0.07 BTC to Eve, and returns 0.0099 BTC as change.

This simple model allows the network to verify ownership and prevent double spending—without needing bank accounts.

Interactive UTXO Visualizer

See how Bitcoin manages "coins" (UTXOs) in your wallet. Click on coins to select them and build transactions!

Launch UTXO Visualizer →

Follow the step-by-step instructions to learn about UTXOs, consolidation, and fees!

Want More Practice?

Interactive Transaction Builder

Build a real Bitcoin transaction step-by-step. Select UTXOs, add recipients, and watch how fees work!

Launch Transaction Builder →

Try creating transactions with different amounts and see how change works!

Interactive: Digital Signatures

Discover how Bitcoin proves ownership without revealing your private key. Sign messages, verify signatures, and understand the cryptography protecting your Bitcoin!

Launch Digital Signatures Demo →

Try signing a message with your private key, then verify it with your public key!

⛏️ Part 3: Mining – How the Network Stays Honest

Mining keeps Bitcoin fair, synchronized, and secure. Miners collect new transactions, group them into blocks, and compete to find a special number—called a nonce—that produces a valid hash starting with enough zeros.

This process is called Proof-of-Work. It requires real energy and computation to add each new block, making the network expensive to attack.

🧩 Interactive: Computational Puzzles

Understand proof-of-work by solving hash puzzles yourself. This is what miners actually do!

Launch Computational Puzzles →

Try auto-solve to see how many attempts it takes to find a valid hash!

Hash Functions (SHA-256)

A hash function turns any input into a fixed-length string of random-looking letters and numbers.

Even one small change completely transforms the output—this is called the avalanche effect.

Try it:

Type any word and see how the hash changes instantly. Now, change one letter. Notice how unpredictable it is? That's why Bitcoin can't be forged or reversed.

Calculating...

Try this: Change just one letter and see how dramatically the hash changes. This "avalanche effect" makes Bitcoin mining unpredictable!

Input: "Hello World"
Hash: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
Input: "Hello world" (lowercase 'w')
Hash: 64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c

Now imagine a global competition:

Everyone is racing to find a hash that begins with a 0. You can change a letter, a space, or a number and try again. The first person to create a valid hash that starts with enough zeros wins.

That's exactly what Bitcoin miners do. Their computers make billions of guesses per second, adjusting a number called a nonce until they find a hash that meets Bitcoin's difficulty rule. The more zeros required at the start, the harder it is to find a valid result—and the greater the proof of work behind it.

🏰

Why It's Nearly Unbreakable

To rewrite Bitcoin's history, an attacker would have to:

  1. Re-mine the altered block
  2. Re-mine every block after it
  3. Outpace the entire network

With today's hashrate (~400 EH/s), this would require more energy than all supercomputers combined—making it practically impossible.

Mining Simulator:

Adjust difficulty levels and see how long it takes to find a valid block.

⛏️ Interactive Mining Simulator

Experience Bitcoin mining firsthand! Adjust difficulty levels and see how mining actually works.

Launch Mining Simulator →

Start with Easy Mode to learn the concepts, then try Realistic Mode to see actual Bitcoin difficulty!

Key Takeaways

  • The blockchain is Bitcoin's tamper-proof memory
  • Transactions use UTXOs, not balances, for clear ownership and validation
  • Mining turns electricity into security, making attacks prohibitively expensive
  • Hash functions ensure even tiny changes are instantly detectable
  • New blocks appear every ~10 minutes, keeping global consensus in sync

Master Bitcoin's Mechanics

Build a Bitcoin Transaction

Arrange the pieces in the correct order:

    Bitcoin Jargon Buster

    Think first, then reveal:

    What is a hash?
    What is a nonce?
    What makes the blockchain immutable?
    What is a UTXO?

    ⛏️ Try Mining (Simplified)

    Find a number that creates a hash starting with "00". Miners do this billions of times per second!

    Hint: Try numbers between 100-300