← Bitcoin Encyclopedia

ypub / zpub

🌳 Advanced

💡 The Plain-English Definition

An xpub, ypub, or zpub is an extended public key — a single master key that can generate every receiving address in one wallet account. The differing first letters (x, y, z) are a convention that signals which address format the wallet uses. They matter for compatibility, and they matter for privacy, because anyone holding your extended public key can see your entire history.

🤔 But Why Though?

Modern wallets are built from a single seed, and from that seed they derive an endless series of addresses, so you can use a fresh one for every payment. The extended public key is the piece that lets a wallet generate all of an account’s receiving addresses without touching the private keys. It is how a watch-only wallet can show your balance without being able to spend.

The letter prefixes are a labelling convention. They tell software which style of address to expect.

xpub points to the original legacy addresses, which start with a 1.

ypub points to wrapped SegWit addresses, which start with a 3.

zpub points to native SegWit addresses, which start with bc1 and pay the lowest fees.

Underneath, the secret is the same; the prefix just stops your wallet from showing the wrong address type.

Here is the privacy point that catches people out. An extended public key cannot spend your coins — that part is true. But it can derive every address you will ever use in that account, which means anyone who has it can see your complete balance and transaction history, past and future, at a glance. Paste your zpub into a random website or a block explorer’s search box and you have handed a stranger a permanent window onto all of your finances in that wallet.

🌍 The Real-World Analogy

An extended public key is like a master guest-list that automatically writes in every future name at your events. Handing it out does not let anyone take your seat — they cannot spend — but it does let them read the entire guest list, forever, including events you have not held yet. That is why a zpub feels harmless, since it is only a public key, but is in truth one of the most privacy-sensitive things in your wallet.

⚡ So What?

There are two practical takeaways. For compatibility: if you are moving a wallet between apps and the addresses or balance look wrong, a mismatched key type (an xpub where the app wanted a zpub) is a common cause, and the right import option usually fixes it. For privacy: treat your extended public key like a diary of all your spending. Do not paste it into websites, do not share it casually, and know that giving it to a service — even a watch-only app — lets that service monitor everything the account does. It cannot take your bitcoin, but it can watch every coin you hold.

📩 The Daily Bit · free

Get one plain-English Bitcoin email each morning.

The Daily Bit — free, two minutes, unsubscribe anytime.

The Bitcoin Family GuidePrefer a book? The Bitcoin Family Guide