A miner calculates a hash, a numerical fingerprint of the block header. To satisfy Proof of Work (a proof of computational effort), that result must be less than or equal to a prescribed limit called the target. Nonce is one of the values that can be changed to prepare another attempt. It is not a password or a secret key: anyone can see it once the block is published.
Anna runs mining equipment that is trying to produce a new block of transactions. It takes the block header, a compact set of information about the block, and uses SHA-256 to calculate a numerical fingerprint called a hash. Bitcoin applies the calculation twice, hence double-SHA-256. If the result exceeds the allowed limit, the device changes, for example, Nonce from 10 to 11 and tries again. Anna does not guess numbers herself; the equipment makes huge numbers of attempts automatically. A higher Nonce does not mean a lower hash or progress toward the goal. Exactly the same header always produces the same hash, so calculating it again adds no new chance. [1] [2]
Nonce occupies four bytes, or 32 bits. These hold whole numbers from 0 through 4,294,967,295 inclusive: 4,294,967,296 possibilities in total, written as 2^32. That sounds enormous to a person, but a specialized mining device called an ASIC can work through the range very quickly. Trying every value does not guarantee success. If the other header data remain unchanged, starting again merely repeats the previous results. Mining software therefore needs to prepare different headers too. [1] [5]
One option is to change Extranonce. The similar name can be misleading: this is not an extra header field, but data inside the coinbase transaction, the first transaction in a block, which assigns the mining reward. Changing it changes that transaction's identifier, its txid, and then the Merkle root, the combined fingerprint of transactions stored in the header. The equipment now has different input. It can use the same Nonce values again, but this time it hashes different headers. Another set of 2^32 possibilities still does not guarantee a block. [2] [3]
A block explorer may show a small Nonce for one block and a large one for another. The number alone tells you neither how difficult the block was to find nor whether it is better. A Full Node, software that independently verifies blocks and transactions against Bitcoin's rules, hashes the entire header and compares the result with the valid target, whose compact representation is stored in nBits. What matters is whether the hash is less than or equal to that limit, not the size of Nonce. The checks do not end there: the node must also validate the transactions and the other block-validity rules. [1] [8]
You will also encounter nonce when reading about transaction signatures. There it can mean a secret auxiliary number, technically a scalar, which the signing algorithm uses alongside the Private Key, the secret key that authorizes spending. Incorrectly reusing that number for different messages can reveal the key. The mining Nonce is different: it is public, and the same number can appear in different headers. The public parts of a signature are also distinct from that secret auxiliary value. Rules for one use cannot simply be transferred to the other. [9]
When many devices mine together in a Mining Pool, they should not all hash the same headers. Repetition would not add new attempts. The coordinator therefore assigns different data, for example for coinbase and Extranonce. Protocols such as Stratum carry mining jobs; the connected mining units are also called workers. BIP23 additionally describes an optional noncerange parameter for specifying a Nonce range. This does not mean every pool must use it, or that a pool can change the block-validity rules. [4] [2]
A Merkle Tree combines transaction fingerprints step by step into one combined fingerprint, the Merkle root. The coinbase transaction's identifier, its txid, enters that calculation as one leaf of the tree. Changing Extranonce therefore produces a new txid and then a new Merkle root. The miner can keep the other transactions and the reference to the previous block while obtaining a different header. This does not rewrite a confirmed block: it changes a proposed new block for which valid Proof of Work has yet to be found. [1] [2]
Software can create further header variants by changing the time, nTime, within permitted bounds or by changing permitted version bits. The latter technique is called version rolling. BIP320 proposes general-purpose use of selected nVersion bits; the proposal itself does not authorize arbitrary changes to every bit. The network rules and the assigned mining-job rules still apply. None of these options bypasses the requirement for the resulting hash to meet the valid target. The newer BIP323 proposes more bits; its status remains Draft. [4] [5] [10]
For technical documentation, it helps to know the format too. The 80-byte block header contains the version, previous-block hash, Merkle root, time, nBits and the four-byte Nonce. Nonce is an unsigned 32-bit integer of type uint32. It is encoded in little-endian order, with the least significant byte first. Changing Nonce alone changes the header and its double-SHA-256 hash, not the transaction list. Software needs this exact representation, although understanding the purpose of mining does not require assembling it by hand. [1]
An advanced reader can use Bitcoin Core's getblockheader command with a particular block's hash. The default detailed output includes nonce, bits and time. Setting the verbose parameter to false returns the exact 80 header bytes in hexadecimal. You can calculate double-SHA-256 from these bytes and compare the numerical result with the valid target. A custom implementation must respect Bitcoin's byte order; reversing bytes incorrectly leads to a different comparison. Merely reading Nonce in a block explorer does not perform that verification. [1] [6] [8]
For the clearest picture, read this entry together with Block Header, Mining, Proof of Work, Mining Target, Coinbase transaction, Bitcoin. The reverse links also lead from Block Header, Coinbase transaction, ASIC Miner, Stratum V1.