Library · Crypto, word by word · Inside Bitcoin
What is an xpub?
An xpub, or extended public key, is a single code from which a wallet can generate every receiving address in an account, as defined in BIP-32. It cannot spend coins, but anyone holding it can see all of that account's addresses, balances and history.
What it means for you
Pasting an xpub into a portfolio app or block explorer reveals your whole account's history to whoever runs it, not just one address. And if an xpub leaks together with any one of its non-hardened child private keys, the parent private key can be rebuilt and everything in the account spent.
How it works
BIP-32 pairs each key with an extra value called a chain code; a public key plus its chain code is an extended public key. Serialized in Base58, a mainnet one starts with 'xpub' (the private version, 'xprv'). From an xpub, child public keys at normal, non-hardened indices can be derived without any private key, which is how watch-only wallets, auditors and payment servers generate addresses. Unlike a single public key, which gives one address, an xpub gives a whole tree of them. BIP-32 warns that an xpub plus any non-hardened descendant private key equals knowing the parent private key.
Source: BIP-32: Hierarchical Deterministic Wallets · checked 4 October 2026
Often confused with
Related words
Educational content, not financial advice. Written by hand and checked against the source named above. Something wrong? Tell us and we reply within two business days.