Nonce
16/04/2026
A nonce (number used once) is a 32-bit integer field in a block header that miners increment with each hash attempt. The goal of Proof of Work mining is to find a nonce value that produces a block hash below the current difficulty target.
How nonces work in mining
- The miner takes the block header (containing the previous block hash, Merkle root, timestamp, and other fields)
- Appends a nonce value (starting at 0)
- Hashes the entire header with SHA-256 (or the relevant algorithm)
- Checks if the result is below the target
- If not — increments the nonce by 1 and repeats
- If yes — the block is valid and broadcast to the network
With Bitcoin's 32-bit nonce space (about 4 billion values), modern ASICs exhaust all nonce values in milliseconds. When that happens, miners modify other fields (e.g., the timestamp or extra nonce in the coinbase transaction) to continue searching.
Nonce vs. extra nonce
| Nonce | Extra nonce | |
|---|---|---|
| Location | Block header | Coinbase transaction |
| Size | 32 bits (~4 billion values) | Up to 8 bytes (much larger space) |
| Purpose | Primary search field | Expands search space when nonce is exhausted |
