Live · Mon, Sep 14, 2026 · 21:02 UTC Block 843,917 Fees 14 sat/vB Fear & Greed 72 · Greed
Newsletter Pro Terminal Sign in
McLeod Pacific Investments.
Subscribe →
Live · 21:02 UTC Block 843,917 F&G 72
Bitcoin Basics Bitcoin Basics desk

What is a Bitcoin extended public key (xpub)?

A Bitcoin extended public key (xpub) lets a wallet generate unlimited receiving addresses from a single key, without ever touching your private keys. Understanding what it is helps you use Bitcoin tools more safely.

Golden Bitcoin coins spread across laptop keyboards showcasing digital currency and finance.

Photo by https://kaboompics.com/ on Pexels

A Bitcoin extended public key, commonly written as an xpub, is a special type of public key that lets a wallet or application generate an entire sequence of receiving addresses from one piece of data. It's a concept that sits just beneath the surface of how modern Bitcoin wallets operate, and understanding it helps you make smarter choices about privacy, watch-only wallets, and multi-device setups.

What an xpub actually is

Bitcoin wallets today don't use a single address. They follow a standard called hierarchical deterministic (HD) wallets, where one seed phrase generates a whole tree of keys. The xpub sits at a specific branch of that tree. Share the xpub and the recipient can derive every child public key under that branch. That means every receiving address your wallet would ever produce can be reconstructed. No private key is needed. No funds can be moved. But every transaction can be watched.

Think of it as a master stamp. Press it and you get address number one. Press it again with a different counter and you get address number two. A Bitcoin wallet does exactly this, generating a fresh address for every transaction to protect your privacy on the blockchain.

How xpubs fit into HD wallets

HD wallets derive keys using a process defined in Bitcoin Improvement Proposals 32, 44, and 84 (BIP32, BIP44, BIP84). The xpub is the output of BIP32's key derivation when you stop at the account level rather than an individual address. Most hardware wallets and software wallets expose an xpub precisely at this point, making it portable between apps without giving away spending ability.

The companion to an xpub is the xprv, the extended private key. The xprv can derive both public and private child keys, meaning it can sign and spend. The xpub can only derive public child keys. This asymmetry is the whole point.

What you can do with an xpub

The most practical use for an xpub is setting up a watch-only wallet. You import your xpub into a monitoring app, and the app can display your full balance and transaction history without ever holding a key that could spend your funds. This is useful if you store Bitcoin on a hardware wallet and want to track incoming payments from a phone or laptop without connecting the hardware device every time.

Businesses use xpubs too. An e-commerce store can load a single xpub and generate a unique Bitcoin address for every customer order. The private keys stay on an air-gapped machine. The website only knows about public key derivation, so a server breach doesn't expose funds.

The privacy risk you need to know

Sharing your xpub is not cost-free. Whoever holds it can see every address your wallet has produced or will ever produce under that branch. They can track every incoming payment, every balance change, every transaction. On a pseudonymous network like Bitcoin, that's a significant de-anonymisation risk.

This is worth taking seriously. You wouldn't hand a copy of your bank statements to a stranger, and sharing your xpub is functionally similar. Only share it with software you control or a service you fully trust. Never post it publicly.

It's also worth noting that different xpub formats exist. The original xpub prefix is used for legacy and SegWit addresses. Wallets using native SegWit (bech32 addresses starting with bc1) often use zpub instead. Some use ypub for wrapped SegWit. The underlying cryptographic mechanism is the same in each case. The prefix signals which address format the wallet is deriving.

How an xpub differs from a regular public key

A standard Bitcoin public key generates exactly one address. Full stop. An xpub is extended because it carries extra data: a chain code and depth information that together allow child key derivation. A regular public key is a single point on an elliptic curve. An xpub is that point plus the metadata needed to walk the entire tree beneath it.

When you look at a raw xpub string, it starts with the prefix xpub and is followed by a long base58-encoded string, typically 111 characters. That string encodes the public key itself, the chain code, the depth in the key tree, the parent key fingerprint, and the child index. All five components are needed for child derivation to work correctly.

Is it safe to use xpubs?

Used correctly, yes. The rule is straightforward: an xpub reveals balances and transaction history but cannot move funds. If your threat model includes financial surveillance, be selective about where you paste it. If you're setting up a watch-only monitoring tool for your own hardware wallet, the xpub is exactly the right tool for the job.

Where problems arise is when people confuse xpub exposure with xprv exposure. Sharing an xprv is catastrophic. Anyone with the xprv can derive every private key and sweep every satoshi. Sharing an xpub is a privacy trade-off, not a security catastrophe, but it's a trade-off that deserves thought.

McLeod Pacific Investments recommends that beginners familiarise themselves with their wallet's key structure before exporting any extended key. Most reputable hardware wallets, including Trezor and Ledger, display the xpub clearly in their companion apps and require explicit confirmation before exporting it, which is a sensible safeguard. McLeod Pacific Investments also provides personalised Bitcoin education for clients who want to understand these concepts before putting them into practice.

Key takeaways

  • An xpub is an extended public key that lets a wallet derive unlimited child public keys and addresses.
  • It cannot sign transactions or spend funds. Only the paired xprv can do that.
  • Sharing an xpub enables full balance and transaction visibility, so treat it as sensitive financial information.
  • The most common use cases are watch-only wallets and business payment address generation.
  • Format prefixes (xpub, ypub, zpub) signal the address type but not a different security model.
→ The Confirmations · Daily newsletter

One email at 06:00 UTC. Six minutes. The only digest written for desks, not for retail.