# 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.

Canonical page: https://mybitcoinexplorer.com/learn/public-keys
Topic: Keys and addresses
Published: 2026-10-29
Updated: 2026-10-30


## 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](https://mybitcoinexplorer.com/learn/elliptic-curve-cryptography). It's a point with an x and a y coordinate.

> Diagram: Public keys are calculated from private keys, never the other way around — Private key: 32 bytes → (× G)*Public key: 33 bytes compressed → (HASH160)Key hash: 20 bytes

## Formats
| Format | Size | Starts with |
|---|---|---|
| Uncompressed | 65 bytes | `04` then x and y |
| Compressed | 33 bytes | `02` or `03` then x |
| x-only (Taproot) | 32 bytes | just 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)](https://mybitcoinexplorer.com/learn/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](https://mybitcoinexplorer.com/learn/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.


## 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.

## Related lessons

- [Private keys](https://mybitcoinexplorer.com/learn/private-keys)
- [Bitcoin addresses](https://mybitcoinexplorer.com/learn/bitcoin-addresses)
- [HASH160 and RIPEMD-160](https://mybitcoinexplorer.com/learn/hash160-and-ripemd160)
- [Elliptic curve cryptography](https://mybitcoinexplorer.com/learn/elliptic-curve-cryptography)
