BITCOIN MAINNETLive explorer status
OWNERSHIP

Public keys

A public key is a point on the secp256k1 curve, calculated from your private key. Learn its formats, how it becomes an address and when it is revealed.

Made from the private key

Your public key is your private key multiplied by a fixed point on the secp256k1 curve. See Elliptic curve cryptography. It's a point with an x and a y coordinate.

Public keys are calculated from private keys, never the other way aroundPrivate key32 bytes× GPublic key33 bytes compressedHASH160Key hash20 bytes
Public keys are calculated from private keys, never the other way around

Formats

FormatSizeStarts with
Uncompressed65 bytes04 then x and y
Compressed33 bytes02 or 03 then x
x-only (Taproot)32 bytesjust x

Compressed keys store only x plus a byte saying whether y is even (02) or odd (03); y can be recomputed from the curve equation. All modern wallets use compressed or x-only keys.

When is it revealed?

For most address types (like Pay to public key hash (P2PKH) and native SegWit), the output only holds a hash of the public key. The key itself appears on the blockchain when you spend. Taproot outputs contain the (tweaked) public key directly.

See a public key on-chain

Open a native SegWit spend on MyBitcoinExplorer and look at the input's witness: the second item, 33 bytes starting with 02 or 03, is the public key being revealed to prove ownership.

One private key, several addresses

The same public key can be encoded as a legacy (1…), nested SegWit (3…) or native SegWit (bc1q…) address. They look unrelated but are controlled by the same key, so wallets keep them separate for privacy.

Share this guide
Share on X ↗

Key takeaways

  • A public key is private key × G on secp256k1.
  • Compressed keys are 33 bytes; Taproot uses 32-byte x-only keys.
  • Most outputs reveal only a hash of the key until it's spent.

Common questions

Is a public key the same as an address?

No. An address is usually derived from a hash of the public key, plus encoding and a checksum.

Is it safe to share my public key?

Yes for security, though sharing it can reduce privacy if it links your addresses.

Can someone steal bitcoin with my public key?

Not with any known method on today's computers.

Is the public key stored in my address?

Usually only its hash is. The key itself appears on-chain when you spend, except for Taproot.