Nonce
A nonce — short for "number used once" — is a value included in data specifically so that the data can be varied or ordered, and in blockchains it appears in two distinct places that beginners often conflate. In proof-of-work mining, the nonce is a field in the block header that miners change over and over, rehashing the block each time, until the resulting hash falls below the difficulty target. The nonce itself is meaningless; it exists purely to give miners something to vary. For example, a Bitcoin miner may iterate through billions of nonce values per second, and when the block header's other fields are exhausted, it also tweaks an extra nonce in the coinbase transaction to keep searching.
The second use is the account nonce on chains like Ethereum: a counter attached to every account that increments with each transaction sent. It guarantees transactions execute in order and prevents replay attacks — without it, a signed "pay 1 ETH to Alice" message could be rebroadcast and executed repeatedly. If you send transaction nonce 7 with a low fee and it stalls, transactions 8 and 9 wait behind it, which is why wallets let you "replace" a stuck transaction by resending nonce 7 with a higher fee.
A common misconception is that these two nonces are the same mechanism; they share only a name — one is a mining search variable, the other an anti-replay sequence number.
Related terms