Keys & Addresses

Xpub

An extended public key (xpub) is a master public key that can derive all child public keys and addresses in a specific branch of an HD wallet. It enables watch-only wallets and address generation without access to private keys.

How It Works

An xpub is a specific node in an HD wallet's key tree that contains the public key and chain code for its branch. With these two pieces of information, anyone can derive all child public keys and their corresponding addresses — without ever having access to the private keys. This is what makes watch-only wallets possible: import the xpub into a software wallet and you can see all balances and generate fresh receiving addresses, while the private keys stay safely on your hardware wallet.

The xpub format varies by address type. Traditional xpubs (starting with "xpub") are for legacy addresses, ypubs for wrapped SegWit, zpubs for native SegWit, and newer descriptors handle Taproot. Most modern wallet software handles the conversion automatically, but it is worth understanding which format your wallet exports to avoid confusion during recovery.

The critical security consideration is privacy. Your xpub is essentially your complete financial record. Anyone with it can see every transaction you have ever made in that account and every address you will use in the future. Never share your xpub with third-party services unnecessarily, and never post it online. If a service requires your xpub, understand that you are giving them full visibility into your Bitcoin activity.

Key Points

  • Master public key that derives all child addresses in an HD wallet branch
  • Enables watch-only wallets for balance monitoring without private key exposure
  • Different formats (xpub/ypub/zpub) correspond to different address types
  • Exposes your complete transaction history — treat as sensitive privacy data
  • Safe to use between your own devices, dangerous to share with third parties