BITCOIN MAINNETLive explorer status
THE SHARED RECORD

The block header

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

The 80-byte block headerVersion4 BPrevious block hash32 BMerkle root32 BTime4 BBits4 BNonce4 B
The 80-byte block header
FieldWhat it does
VersionSignals which rules or upgrades the miner supports
Previous block hashLinks this block to its parent. See What is the blockchain?
Merkle rootA single hash committing to every transaction. See Merkle trees and the merkle root
TimeWhen the miner says the block was made. See Block timestamps
BitsThe compact form of the target
NonceThe 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.

EXAMPLE

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

EXAMPLE

Verifying the genesis block hash

  1. Take the 80 header bytes of block 0 as raw hex.
  2. Hash them with SHA-256, then hash the result again.
  3. Reverse the byte order of the result.
  4. 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.

Share this guide
Share on X ↗

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.