Block Header

Block Header

A block header is like the metadata at the top of a block of transactions.

The fields in the block header provide a unique summary of the entire block.


Here's the block header for block 123,456:



Field Description
Version The version of the block.
Previous Block Hash The Block Hash of the block that this block is being built on top of. This is what "chains" the blocks together.
Merkle Root All of the transactions in this block, hashed together. Basically provides a single-line summary of all the transactions in this block.
Time When a miner is trying to mine this block, the Unix time at which this block header is being hashed is noted within the block header itself.
Bits A shortened version of the Target.
Nonce The field that miners change in order to try and get a hash of the block header (a Block Hash) that is below the Target.

Data Structure

Field Size Data
Version 4 bytes Little-endian
Previous Block Hash 32 bytes Big-endian
Merkle Root 32 bytes Big-endian
Time 4 bytes Little-endian
Bits 4 bytes Little-endian
Nonce 4 bytes Little-endian


  • Hash Block Header - Insert individual block header fields, and get the serialized block header and the Block Hash.

By Greg Walker,

Last Updated: Mar 14 2018
  • Mar 14 2018: Renamed block-id to block-hash, finally
  • Aug 16 2017: Finally got nVersion showing correctly. Had to fix Version.php class in bitcoinphp
  • Jan 13 2017: tidied up glossary pages - css, formatting, restructuring
  • Jan 01 2017: Moved /manual/guide/ and /manual/reference/ to /guide/ and /glossary/