An HD wallet, short for hierarchical deterministic wallet, is a crypto wallet that derives an unlimited tree of key pairs from a single seed, so one backup restores every private key and address the wallet has ever used. In wallets & custody, the HD design is the reason a twelve or twenty-four word recovery phrase can protect years of activity across many accounts and blockchains.
The model was standardized for Bitcoin in BIP32, extended by BIP39 for mnemonic seed phrases and BIP44 for a common path layout, and it is now used by nearly every modern software and hardware wallet in Crypto & blockchain, including multichain wallets that hold Bitcoin, Ethereum and Solana assets side by side.
How an HD wallet derives keys from one seed
An HD wallet works by feeding a random seed of 128 to 512 bits into HMAC-SHA512, which produces a master private key and a chain code. The chain code is extra entropy that, together with a parent key and an index number, deterministically produces each child key. Repeating the step creates grandchildren, great-grandchildren and so on, forming a tree.
Because the process is fully deterministic, the same seed always regenerates the same tree in the same order. The wallet therefore never needs to back up individual keys: it only needs the seed, usually encoded as a BIP39 mnemonic, plus knowledge of which derivation paths were used. Older non-deterministic wallets, by contrast, generated independent random keys and required a fresh backup whenever new keys were created.
The table below summarizes the building blocks that appear in every BIP32 implementation.
| Component | Size or form | Role in the tree |
|---|---|---|
| Seed | 128-512 bits, often from a BIP39 phrase | Single root secret for the whole tree |
| Master key | 256-bit private key | Root node from which all branches start |
| Chain code | 256 bits | Extra entropy that prevents guessing child keys |
| Child index | 32-bit integer | Selects one branch under a parent node |
| Extended key | xprv or xpub string | Key plus chain code, able to derive descendants |
Hardened and non-hardened derivation
BIP32 defines two child types, and the difference is the most important security detail of the HD wallet design. Non-hardened children (indexes 0 to 2^31 – 1) can be derived from the parent extended public key, which lets a server or watch-only wallet generate fresh receiving addresses without holding any private key.
Hardened children (indexes 2^31 and above, written with an apostrophe such as 44′) require the parent private key. Hardening blocks a known attack: if an attacker obtains an xpub plus any single non-hardened child private key, simple arithmetic reveals the parent private key and therefore every sibling key. For that reason, the upper levels of standard paths are always hardened.
| Property | Non-hardened | Hardened |
|---|---|---|
| Index range | 0 to 2,147,483,647 | 2,147,483,648 and above |
| Derivable from xpub | Yes | No, needs the private key |
| Typical use | Address and change levels | Purpose, coin type and account levels |
| Risk if a child key leaks | Parent key can be recovered with the xpub | Leak stays isolated to that child |
Derivation paths and standards
A derivation path is the address of a key inside the tree, written as m / purpose’ / coin_type’ / account’ / change / address_index. BIP44 fixed this five-level layout so that different wallet software can restore the same funds from the same seed. Later proposals changed only the purpose number to signal the address format.
Path mismatches are the most common reason a correctly restored seed appears to show an empty balance. The seed is fine, but the new wallet is scanning a different branch.
| Standard | Example path | Address type |
|---|---|---|
| BIP44 | m/44’/0’/0’/0/0 | Legacy Bitcoin P2PKH, also used by most EVM wallets as m/44’/60’/0’/0/n |
| BIP49 | m/49’/0’/0’/0/0 | Nested SegWit P2SH-P2WPKH |
| BIP84 | m/84’/0’/0’/0/0 | Native SegWit P2WPKH, bc1q addresses |
| BIP86 | m/86’/0’/0’/0/0 | Taproot P2TR, bc1p addresses |
| SLIP-0010 | m/44’/501’/0’/0′ | Ed25519 chains such as Solana, hardened only |
The coin type number comes from the SLIP-0044 registry (0 for Bitcoin, 60 for Ethereum, 501 for Solana). The change level separates external receiving addresses (0) from internal change addresses (1), which matters for UTXO chains that return leftover value to the sender.
HD wallets compared with related wallet designs
The HD structure describes how keys are generated, not where they are stored or who controls them. A hardware wallet, a mobile hot wallet and a browser extension such as MetaMask can all be HD wallets. The comparison below places the concept next to neighboring designs in the same Topic.
| Design | Key generation | Backup model | Main difference |
|---|---|---|---|
| HD wallet | Tree derived from one seed | One seed phrase | Unlimited addresses, single backup |
| Non-deterministic wallet | Independent random keys | Every key backed up | Backups go stale as keys are added |
| Multisig wallet | Several HD trees, one per signer | Each seed plus the wallet descriptor | Spending needs m-of-n signatures |
| MPC wallet | Key shares, no full key exists | Share backups held by parties | No single seed to steal or lose |
| Smart contract wallet | Contract logic plus signer keys | Recovery rules in code | Supports social recovery and policies |
Privacy and operational benefits
HD wallets make it practical to use a fresh address for every payment, which reduces address reuse and makes on-chain linking harder. Separate accounts at the third level let one seed keep business, personal and savings funds in distinct branches without mixing their histories.
Extended public keys enable watch-only setups: an accounting system or merchant server can generate invoices and track balances while the private keys stay offline on a hardware device. That separation is a cornerstone of practical self-custody for businesses.
Risks, limitations and common mistakes
The single seed is both the strength and the single point of failure: anyone who learns the seed controls every derived key, and losing it means losing every branch. Experienced practitioners treat the xpub as sensitive data as well, because it exposes the entire transaction history of an account.
- Sharing an xpub with an untrusted service reveals all past and future addresses of that account.
- Assuming one path when restoring can hide funds held under BIP49, BIP84 or a vendor-specific path.
- Ignoring the gap limit, usually 20 unused addresses, can make a restored wallet stop scanning before it finds later deposits.
- Forgetting an optional BIP39 passphrase produces a valid but entirely different tree with no error message.
- Exporting a child private key while an xpub is public breaks non-hardened isolation.
The short version
An HD wallet works like a master recipe that can bake endless keys. Instead of storing hundreds of separate keys, the wallet keeps one secret starting point, the seed, and follows fixed steps to recreate any key whenever it needs one.
The practical result is simple: write down the recovery phrase once, keep it safe, and every address can be rebuilt on a new device. The flip side is equally simple: whoever holds that phrase holds everything.
Where it makes a difference
A small online store accepts Bitcoin and wants a unique address for every order without keeping private keys on its web server. The owner initializes a hardware wallet, records the 24-word phrase on a steel plate, and exports the account xpub for path m/84’/0’/0′. The checkout software derives a new bc1q address from that xpub for each invoice and marks orders as paid when deposits arrive.
After two years and roughly 3,000 orders, the hardware device fails. The owner buys a replacement, enters the same phrase and selects the native SegWit account. Because the receiving index has grown far beyond 20, the owner raises the gap limit to 3,500 in the wallet software. Every historical address and the full balance reappear, and no funds are lost despite the hardware failure.