Level 2 · First stepsThe village#102

Seed phrase explained: one recipe for every key, written in plain words

A seed phrase is a list of 12 to 24 ordinary words that stands for one large random number. Your wallet turns the words into a seed and grows every key from it, so the words alone can rebuild the whole wallet, in any compatible app.

Grandma Rosa has read about keys and has a worry. A modern wallet, she has heard, holds thousands of them. "Do I have to copy all of those by hand?"

No, says Anna. Every key is cut from one master recipe. Keep the recipe and you can cut every key again, in any workshop, in any village. Lose it, and the keys are only as safe as the one drawer they sit in.

That recipe is the seed phrase: 12 to 24 everyday words that stand for one big random number. The words aren't a password to an account. They are the account.

What it is

A seed phrase, also called a recovery phrase or mnemonic, is a way to write down a wallet's randomness so a human can copy it without mistakes. The format most wallets use is BIP 39, a Bitcoin standard assigned on 10 September 2013 (BIP 39).

The wallet starts with 128 to 256 random bits. It adds a few check bits, then cuts the result into groups of 11 bits, "each encoding a number from 0-2047". Each number picks one word from a fixed list of 2,048 English words (BIP 39 wordlist). The words go in, a seed comes out, and the seed grows every key.

How it works: one public phrase, from bits to keys

BIP 39 links to a file of official test phrases, so programmers can check their code (BIP 39 test vectors). We use the second one. Everyone can read it, so never put money on it.

  1. The randomness. The test starts with 128 bits written as the pattern 7f7f7f7f... repeated. A real wallet uses true randomness. A pattern is used here precisely because it isn't secret.
  2. The numbers. Cut into 11-bit groups, those bits become 1019, 2015, 1790, 2039 and so on, twelve numbers in all. We did the split ourselves.
  3. The words. Word 1019 on the list is "legal", 2015 is "winner", 1790 is "thank", 2039 is "year". The full phrase reads: "legal winner thank year wave sausage worth useful legal winner thank yellow". The last word also carries the check bits. Our article on why it's 12 or 24 words does that arithmetic.
  4. The seed. BIP 39 runs the words through a function called PBKDF2 with HMAC-SHA512, 2,048 rounds, and the result is 512 bits, 64 bytes, long. With no passphrase, we calculated a seed that starts 878386ef. The test file prints a seed starting 2e890581, because its vectors add a passphrase. We recalculated it: the passphrase is "TREZOR". One extra word, a completely different seed. Our article on the 25th word explains why that is useful.
  5. The keys. From the seed, the method in BIP 32 grows a whole tree of private keys, designed to be "interchanged between different clients" (BIP 32). Same words, same seed, same tree, in every wallet that follows the standards. Our article on multi-chain wallets shows one branch per coin.

Nothing in that chain is stored at a company. It's arithmetic. Anyone who has the words can run it, today or in twenty years.

Why it matters

A wallet without a shared standard can only be restored by the same kind of software that made it. One standard phrase changes two things.

It made the backup small. Twelve words fit on a postcard and can be read aloud, checked and copied by hand.

It made wallets replaceable. Your app can disappear, your phone can break, the company can close. Type the words into another compatible app and the same keys appear, reading the same coins from the notebook.

Both gains have the same price. The recipe is the only thing a thief needs. No password, no phone, no fingerprint. Whoever reads the words can cut every key you have.

Where people get it wrong

  • "The words are a password." A password is checked by a server that can reset it. The words are the key material itself. There is no server to ask.
  • "Every 12-word phrase is BIP 39." Not quite. Electrum, a long-running Bitcoin wallet, uses its own format, and its documentation says "Electrum does not generate BIP39 seeds" (Electrum). Restore a phrase in software that expects another format and you may see an empty wallet.
  • "I can choose my own nice words." The words must come from randomness. Hand-picked words are guessable, and they usually fail the built-in check anyway.
  • "The order doesn't matter." The order is the number. Swap two words and you have different bits, or a phrase the wallet rejects.
  • "Any language will do." BIP 39 has lists in several languages, but it says "it is strongly discouraged to use non-English wordlists", because most wallets support only English.

Read your recipe back

Here's a two-minute check for your own words. Count them: the only valid lengths are 12, 15, 18, 21 and 24. Then look at each word: all 2,048 on the English list can be told apart by their first four letters, so a smudged ending is fine but a smudged beginning isn't. If a word on your paper isn't on the list, fix it now, while the wallet works and can show you the words again.

Rosa did it with her reading glasses and the list beside her. Twelve words, all on the list, all readable. She still doesn't have to copy a single key by hand. She has the recipe, and that's the only thing worth copying.

Frequently asked questions

What is a seed phrase?

A seed phrase is a list of usually 12 or 24 words that encodes the random number a wallet's keys are made from. Most wallets follow the BIP 39 standard. Anyone with the words can rebuild every key and move the coins.

Is a seed phrase the same as a private key?

No. The seed phrase is turned into a seed, and the seed is used to create many private keys, one for each address. Losing a single private key exposes one address, while losing the seed phrase exposes all of them.

Can I restore my seed phrase in a different wallet?

Usually, if the other wallet follows the same standards, BIP 39 for the words and BIP 32 with the same derivation paths for the keys. Some wallets, such as Electrum, use their own seed formats. Check compatibility and test with a small amount first.

Where do the seed words come from?

From a fixed list of 2,048 English words published with BIP 39. Each word stands for a number from 0 to 2,047, and together the numbers spell out the wallet's random starting value plus a few check bits.

Can I make up my own seed phrase?

You shouldn't. A safe seed phrase must come from real randomness generated by the wallet. Words chosen by a person are far easier to guess, and they usually fail the checksum built into the last word.

Sources

  1. Marek Palatinus, Pavol Rusnak, Aaron Voisine and Sean Bowe, BIP 39: Mnemonic code for generating deterministic keys
  2. BIP 39 test vectors (linked from BIP 39)
  3. BIP 39 English wordlist
  4. Pieter Wuille, BIP 32: Hierarchical deterministic wallets
  5. Electrum documentation (source on GitHub), Electrum seed version system

Read next.