Guides / Keys, seeds, and backups

Keys, seeds, and backups

You will see "never use a real seed phrase" on almost every page here. This one explains what a key and a seed actually are, using a throwaway testnet wallet so you can poke at everything without risk.

On this page

Private and public keys

A private key is just a very large secret number. Whoever knows that number can spend the coins tied to it, and nobody else can. That is the whole security model: control of the coins is control of the key.

From the private key, the wallet computes a matching public key. This step only goes one way. You can go from private to public in an instant, but you cannot work backward from the public key to the private one. That is why the public key is safe to hand out while the private key never leaves your control.

Say it out loud once

The private key spends. The public key does not. If someone has your private key, they have your coins, so it is the thing you protect above all else.

Addresses

An address is derived from the public key. It is the short string you paste when someone wants to pay you, and it is completely safe to share. Posting it in a chat or on a forum gives away nothing about your private key.

To send you coins, the other person needs only your address. Nothing secret changes hands. Behind the scenes, receiving coins means a new UTXO gets locked to your address, and spending it later is what requires your private key. So: share the address freely, guard the key.

Addresses come in a few formats, and the first characters tell you both the type and the network. You do not have to choose; your wallet picks one, and they all receive coins the same way.

TypeMainnetTestnetNotes
Legacy1...m... / n...The original format. Works everywhere, costs the most in fees.
SegWitbc1q...tb1q...Native SegWit. Lower fees, the common default today.
Taprootbc1p...tb1p...The newest type. Better privacy and richer spending conditions.

Litecoin follows the same pattern (ltc1q... for SegWit) plus confidential MWEB addresses. Monero is entirely different: you share one long Base58 address, and every payment lands at a fresh one-time stealth address on-chain. The coin guides cover the specifics.

Seed phrases

Managing one private key per address would be a nightmare, so modern wallets start from a single master secret and generate everything from it. That master secret is encoded as a seed phrase, a list of ordinary words (this format is called a BIP39 mnemonic, usually 12 or 24 words).

A wallet that works this way is called an HD wallet (hierarchical deterministic). From one seed it can produce a practically endless supply of keys and addresses, all reproducible from those same words. Write the words down and you have backed up the entire wallet, every address included.

The seed is everything

Anyone who has your seed phrase controls every key and every address it ever generates. It outranks any single private key. On mainnet, a leaked seed means drained funds. Treat it as the one thing to protect, and on testnet treat it as practice for that habit.

Derivation paths

How does one seed turn into many organized accounts and addresses? Through a derivation path, a little map that tells the wallet which branch of the tree to walk down. You will see paths written like m/84'/1'/0'.

You do not need to memorize the numbers, but two are worth recognizing. The 84' part means native SegWit addresses, and the 1' is the coin type. On mainnet Bitcoin the coin type is 0'; the value 1' means testnet, and it is shared across all testnets. If a path has a 1' in that slot, you are looking at test coins.

WIF and exporting a key

Sometimes you want a single private key on its own, not the whole seed, for example to import one address into a node for the code examples elsewhere on this site. For that, a key is exported as WIF (Wallet Import Format), a compact text encoding of one private key.

Testnet WIFs look different from mainnet ones because they carry a different version byte, so a testnet key is easy to tell apart at a glance. In bitcoin-cli against a testnet node with a legacy wallet, you can pull a WIF for an address like this:

bitcoin-cli -testnet dumpprivkey <address>

The string it prints is the private key for that one address. (Modern descriptor wallets, now the default, manage keys as a group instead, so they do not expose single keys this way.) Handle a WIF like any secret, but on testnet the coins behind it are worth nothing, so it is a safe place to experiment.

Backups and restore

A backup means writing your seed phrase down offline, on paper or metal, and storing it somewhere safe. Do not photograph it, do not type it into a notes app, and do not save it to any cloud. The moment a seed touches an internet-connected file, assume it could leak.

A backup you have never tested is a guess. The way to know it works is to restore it: type the words into a fresh wallet and confirm the same addresses come back. On mainnet people put this off because a mistake is scary. On testnet it costs nothing, so build the habit here.

Practice the restore now

Make a throwaway wallet at TestnetWallet, write down its seed, then restore it into a new empty wallet and check the addresses match. Do it a couple of times. When you eventually hold real coins, this will already feel routine.

The one rule

Everything above collapses into a single rule for testnet: generate keys and seeds fresh for testnet, and never reuse a real one. Let the wallet create a brand new seed for you and use only that.

The reason is blunt. A real seed phrase or private key pasted into any tool, faucet, explorer, swap, or example command is compromised the instant you paste it, and there is no undo. The test coins here are fake and worthless, so nothing about learning on testnet ever requires a real key. Keep the two worlds completely separate.

Testnet coins are fake money

  • They have no market value, so never buy or sell them.
  • Never use a real seed phrase or import a real wallet on testnet.
  • Never send mainnet BTC, LTC, or XMR to a testnet address.