Topic · How blockchains work

What is a nonce in blockchain?

The short lesson

Nonce is short for “number used once.” Blockchains use the word in two different ways, and beginners often meet both.

1. The mining nonce (bitcoin)

Each bitcoin block header has a small field called the nonce. Miners change it, hash the header, and check whether the result is below the network’s target. If not, they change it again. Billions of tries later, someone finds a winner and the block is accepted. That trial-and-error is proof of work. See what is a hash function.

2. The account nonce (Ethereum)

On Ethereum, every account has a counter. Your first transaction has nonce 0, the next has 1, and so on. The network processes them in order, and the same nonce cannot be used twice. That stops a signed transaction from being replayed.

Why it shows up in your wallet

If an Ethereum transaction is stuck, later ones wait behind it. Some wallets let you “speed up” or “cancel” by sending a new transaction with the same nonce and a higher fee. Only one of the two can confirm.

Lesson game · earn XP

Check yourself: 3 quick questions

Perfect score = combo bonus. Each question returns in your spaced-repetition review.

Memory · spaced repetition

Flashcards: lock it in

Flip each card, then say if you knew it. Missed cards come back sooner.

Related terms

More in How blockchains work

Common questions

Do I need to set a nonce myself?

Usually not. Wallets set it automatically. Advanced settings let you change it for speed-up or cancel.

Why is my Ethereum transaction stuck?

Often a lower-fee transaction with an earlier nonce is waiting. Later ones queue behind it.

Does bitcoin use an account nonce?

No. Bitcoin uses UTXOs, so it does not need an account counter.

Reviewed and sources

Written and reviewed by Joshua Baskin, founder. Last reviewed . How we check facts · Report an error

  1. Bitcoin developer reference: Block chain (block headers)
  2. Bitcoin developer guide: Mining
  3. ethereum.org: Transactions

Education only. Not investment, tax or legal advice. We do not pick coins.

Start here

Start here. Learn first. Every lesson, tool and glossary page is free and open, with no card and no account. Want the free Scam-Spotting Cheat Sheet + a weekly lesson by email? That's free too.

Start with Lesson 1