BITCOIN MAINNETLive explorer status
OWNERSHIP

HD wallets (BIP 32)

A hierarchical deterministic (HD) wallet derives an endless tree of keys from one seed, so a single backup restores everything. Learn how it works.

One seed, a whole tree

Early wallets made each key separately, so every new address needed a new backup. Hierarchical deterministic (HD) wallets fix that: they derive all keys from one seed in a tree.

One seed creates a tree of keysSeedMaster keyAccount 0Account 1ReceiveChangeReceiveChangeAddr 0Addr 1Addr 0Addr 1Addr 0Addr 1Addr 0Addr 1
One seed creates a tree of keys

Deterministic

"Deterministic" means the same seed always produces exactly the same tree, so restoring the seed in any compatible wallet recreates every key and address.

How a child key is made

Each key has a chain code alongside it. To get child number i, the wallet hashes (with HMAC-SHA512) the parent key, the chain code and i. Half the result tweaks the parent key; the other half becomes the child's chain code.

Hardened vs normal

  • Normal children can be derived from the parent public key. That's what lets an xpub generate addresses without any private keys.
  • Hardened children (written with ′ or h) need the parent private key. They are used near the top of the tree to limit damage if one child private key leaks.

The gap limit

When restoring, a wallet checks addresses in order and stops after it finds a run of unused ones, usually 20. If you generated many addresses without receiving to them, some funds may not appear until you raise the gap limit in settings.

Why HD wallets are a privacy win

Because new addresses cost nothing, HD wallets can give every payment its own address while one backup still covers them all.

Share this guide
Share on X ↗

Key takeaways

  • HD wallets derive every key from one seed.
  • The same seed always rebuilds the same tree of keys.
  • Normal derivation lets public keys create child addresses; hardened derivation adds safety.

Common questions

How many addresses can an HD wallet make?

Billions per branch. In practice, wallets scan for used addresses using a 'gap limit'.

Is an HD wallet the same as a hardware wallet?

No. HD describes how keys are derived; hardware describes where they're stored. Most hardware wallets are HD wallets.

Do I need a new backup after creating new addresses?

No. Every address in an HD wallet comes from the same seed.

Is BIP 32 the same as BIP 39?

No. BIP 39 turns words into a seed; BIP 32 turns that seed into a tree of keys.