Glossary / Developer reference
Label
- Definition
- The label in a Bitcoin URI names the person or business being paid, and in a wallet it is the private note you attach to an address or a transaction.
Specified in BIP-21.
Labels are the only part of a bitcoin payment that exists purely for humans. Nothing you type in one reaches the blockchain, and nothing in your seed phrase brings it back: Bitcoin Core replaced its old account system with labels in version 0.17.0 in October 2018, and they live in the wallet file alone. Losing them costs you your own transaction history at tax time.
How it works
The word label covers two different things, and telling them apart avoids a lot of confusion.
The first is the label parameter defined by BIP21. It rides inside a payment URI as percent-encoded UTF-8, so label=Coffee%20Shop displays as Coffee Shop on your confirmation screen. It is advisory text supplied by whoever built the URI. No signature covers it, no wallet checks it, and an attacker constructing a phishing link chooses it as freely as an honest merchant does.
The second is the note you write yourself. Bitcoin Core exposes this through setlabel, getaddressesbylabel and listlabels, the API that arrived in 0.17.0 when accounts were deprecated and finished replacing them when the account calls were removed in 0.18.0. Sparrow, Electrum and most mobile wallets keep an equivalent field.
Wallet-side labels are metadata sitting beside your keys, not inside them. Restore a seed phrase into fresh software and every coin comes back with no memory of where it came from. BIP329 exists to fix the portability half of that problem: it defines a JSON Lines export with one record per line, each carrying a type of tx, addr, pubkey, input, output or xpub, a reference, and the label text. Several desktop and mobile wallets can read and write the format, so labels can move when you change software.
Where you see it
Labels turn out to be load-bearing in three situations that have nothing to do with payments looking tidy.
Coin control is the first. Deciding which unspent outputs to spend, and which to keep apart, only works if you can tell them apart, and the label is what records that this coin came from a verified exchange withdrawal while that one arrived from a peer-to-peer trade. Merge them in one transaction and you have linked the two histories permanently. Nobody performs merge avoidance from memory.
Tax records are the second. Your cost basis for a given coin lives in your own notes, because a self-custody transfer carries no price. A wallet with labelled deposits and the fiat amount written in is a spreadsheet you already have; a wallet full of unlabelled UTXOs is an afternoon of reconstruction per year.
Phishing is the third, and it runs the other direction. A URI label is attacker-controlled text. Seeing a familiar company name on a payment screen means someone typed that name into a string, nothing more.
Practical habit: label at the moment of the transaction, when you still know what it was, and export the labels alongside your wallet descriptor whenever you take a backup. A seed phrase plus a descriptor plus a label file is a complete restore. A seed phrase alone recovers the money and loses the story.
Label vs PP memo
A memo in the BIP70 payment protocol was merchant text that travelled inside a signed message, so a wallet could at least tie it to a certificate holder. A BIP21 label travels in the clear with nothing vouching for it. That difference was the entire argument for the payment protocol, and it did not save it: BIP70 was removed from Bitcoin Core in version 0.20.0 in June 2020, leaving unsigned labels as the format everyone actually uses.