The block header has six fields in 80 bytes: version, previous hash, merkle root, time, bits and nonce. Learn what each does and why miners hash it.
Six fields
| Field | What it does |
|---|---|
| Version | Signals which rules or upgrades the miner supports |
| Previous block hash | Links this block to its parent. See What is the blockchain? |
| Merkle root | A single hash committing to every transaction. See Merkle trees and the merkle root |
| Time | When the miner says the block was made. See Block timestamps |
| Bits | The compact form of the target |
| Nonce | The number miners change while searching. See The nonce |
Why so small?
Because the header is what miners hash, again and again, trillions of times a second. Keeping it to 80 bytes makes each attempt fast. It also lets light clients download headers only: about 4 MB per 50,000 blocks.
The block hash
The block's ID is the double SHA-256 of these 80 bytes. For the block to be valid, that hash must be below the target set by bits.
The genesis block header
Block 0: bits 1d00ffff (difficulty 1), nonce 2,083,236,893, merkle root 4a5e1e4b…. Its hash begins with ten zeros: 000000000019d668….
Hashing a header yourself
Verifying the genesis block hash
- Take the 80 header bytes of block 0 as raw hex.
- Hash them with SHA-256, then hash the result again.
- Reverse the byte order of the result.
- You get
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, the genesis block hash.
Version bits
Miners use bits in the version field to signal readiness for soft forks, and also as extra search space when the nonce runs out. See Soft forks and hard forks.
Key takeaways
- The header is 80 bytes and has six fields.
- It links to the previous block and commits to all transactions via the merkle root.
- The block hash must be below the target encoded in bits.
Common questions
Why does every block hash start with zeros?
Because it must be below the target. Small numbers written in hex start with zeros.
Can I verify the header myself?
Yes. Hash the 80 bytes twice with SHA-256, reverse the result, and compare it with the block hash and target.
Why is the block header only 80 bytes?
So that miners can hash it extremely fast and light clients can download every header cheaply.
Does the header contain the transactions?
No, only the merkle root, a single hash committing to all of them.