Skip to content
BlockchainBeginner

What a nonce is in blockchain transactions

A nonce is a per-account counter that orders and identifies each transaction on account-based blockchains like Ethereum; a gap stalls the ones that follow.

Vahe HakobyanVahe HakobyanEditor-in-chief Updated Oct 5, 20263 min readFact-checked
A dark navy background with glowing cyan glass blocks joined by light lines on the right.
Illustration: World-Crypt
On this page

Short answer

On account-based networks such as Ethereum, a nonce is a per-account counter that orders and uniquely identifies each transaction. A payment confirms only when its nonce is the next unused one for that address.

Not every blockchain works this way, but on account-based networks the number is part of the payment itself. Most wallets set it for you, so it stays out of sight until a payment gets stuck.

How does a nonce keep transactions in order?

Each address runs its own count, and the number rises by one as each payment confirms. A transaction can confirm only when its nonce is the next unused one for that address. Nodes may hold a future nonce, but they will not confirm it ahead of the missing ones.

  • A future nonce waits in a queue.
  • A gap holds back every later transaction.
  • Filling the missing slot releases the queued ones.

What happens if a nonce is wrong?

A too-low nonce points at a slot the account has already filled, so nodes reject the payment. A too-high nonce is usually queued until the earlier numbers confirm. The payment settles only once the count catches up with it.

How do you replace a stuck transaction?

Send a new transaction that reuses the same nonce, and the network keeps only one of the two. On Ethereum, a replacement needs a higher gas price, often at least ten percent higher, not just a bigger total fee.

A replacement works only while the original is pending. Once it confirms, that nonce is spent.

Transaction nonce vs mining nonce

The two numbers share a name and nothing else. A transaction nonce tracks one account's payments, while a mining nonce is a value a miner changes in a block header until the hash meets the target.

One word, two meanings
Transaction nonce Mining nonce
Counts payments from one account A value a miner changes in a block header
Set by the wallet or entered by hand Tried until the hash meets the target
Orders payments from that account No role in ordering payments

Frequently asked questions

Only one can confirm, because the account count moves a single step. The other is dropped rather than treated as a second payment.

Not in one you have already broadcast. Wallets can replace it with a new transaction using the same nonce, or cancel it with a zero-value transfer to your own address.

No. Account-based chains such as Ethereum use them, while Bitcoin tracks unspent outputs instead.

Your wallet usually reads it and shows it before you confirm. A block explorer also lists the transaction count for the address.

Was this guide helpful?
Written byVahe HakobyanVahe Hakobyan is the editor-in-chief of World-Crypt. He covers bitcoin, markets and regulation, and leads the newsroom that fact-checks every story before it goes live.

Related guides

All Blockchain guides