XPUB (Extended Public Key)
Public key data used to derive many addresses in an HD wallet.
An XPUB, or extended public key, is public cryptographic data from a hierarchical deterministic wallet that can derive many related public keys and addresses. It enables balance monitoring and receive-address generation without exposing the private keys needed to spend. Despite the word “public,” an XPUB should be treated as sensitive financial information.
Hierarchical deterministic wallets organize keys in a tree. A seed creates master material, and derivation paths identify branches for purpose, coin, account, change, and address index. An extended public key includes a public key and chain code used for further non-hardened public derivation. Exporting an account-level XPUB normally reveals that branch, not necessarily every account in the wallet.
XPUBs matter for watch-only wallets, merchant payment systems, accounting, and cold storage. A business can generate a new customer deposit address without placing spending keys on an internet-connected server. A finance team can monitor balances while signers remain on hardware devices. Users can build unsigned transactions online and approve them through a separate signing workflow.
The main risk is privacy. Anyone with the XPUB can derive covered addresses and connect transactions that may otherwise look unrelated. They can observe balances, payments, change patterns, and future activity. Uploading an XPUB to several portfolio tools expands the number of parties holding a permanent financial map. Deleting an account from one service does not revoke copies already made.
Format and compatibility require care. Prefixes such as xpub, ypub, and zpub may encode network or address-type expectations differently across wallet software. An apparently valid import can derive unexpected script types or paths. Wallet descriptors often provide clearer information about keys, scripts, origins, and checksums. Always compare several derived addresses with the original signing wallet before accepting payments.
There is also an advanced key risk: combining an extended public key with a compromised non-hardened child private key can expose related parent private material in affected derivation designs. Keep child private keys secret and use established wallet standards. Export XPUBs only through verified software, transfer them securely, label their exact path, and avoid unnecessary sharing. An XPUB supports safe observation only when its privacy scope and derivation context are understood.
Frequently asked questions
- An extended public key can derive a branch of non-hardened child public keys and addresses without revealing the corresponding private keys. Wallets use it for watch-only balances, payment address generation, accounting, and unsigned transaction construction. Its scope depends on the derivation path and script type. An XPUB cannot normally sign transactions, but it reveals substantial wallet structure and activity.
- It is safer than sharing a seed phrase or private key because an XPUB alone does not provide ordinary spending authority. It is still sensitive. A recipient can monitor derived addresses, balances, transactions, and future activity, linking payments that users expected to keep separate. Share it only with trusted systems, protect backups, and avoid pasting it into unknown explorers or portfolio tools.
- No. Anyone who copied an XPUB can continue deriving and monitoring addresses in its branch. Removing access from one application does not erase other copies. To regain privacy, create a fresh wallet or account branch under an appropriate new setup and stop using addresses derived from the exposed XPUB. Moving funds creates public links, so plan migration carefully.
