# Pay to public key (P2PK)

The earliest Bitcoin outputs locked coins directly to a public key. Learn how P2PK works, where to find it, and why it was replaced by P2PKH.

Canonical page: https://mybitcoinexplorer.com/learn/p2pk
Topic: Bitcoin Script
Published: 2026-10-29
Updated: 2026-10-30


## The simplest lock
~~~
Locking:   <public key> OP_CHECKSIG
Unlocking: <signature>
~~~

> Diagram: Executing P2PK — <sig → :sig;<pubkey → :sig,pubkey;OP_CHECKSIG:TRUE

The spender only supplies a signature. `OP_CHECKSIG` checks it against the public key stored right in the output.

## Where you'll see it
Early coinbase transactions, including the genesis block and most coins mined in 2009–2010, pay to P2PK. Many of those coins have never moved.

### Worked example: Block 170 uses P2PK
Both outputs of [Satoshi's payment to Hal Finney](/tx/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16?block=00000000d1145790a8694403d4063f323d499e655c83426834d4ce2f8dd4a2ee) are P2PK: 10 BTC locked to Hal's public key and 40 BTC back to Satoshi's.


## Why it was replaced
- The full public key (65 bytes uncompressed) sits in every output, which is bigger than a 20-byte hash.
- There's no short [address](https://mybitcoinexplorer.com/learn/bitcoin-addresses) format for it.
- The public key is exposed from the start rather than at spend time.

[Pay to public key hash (P2PKH)](https://mybitcoinexplorer.com/learn/p2pkh) solved these and became the standard.


## See it in block 170
Open [block 170](/block/170) on MyBitcoinExplorer and the Satoshi-to-Hal transaction inside it. Both outputs show the script type `pubkey`: that's P2PK. There is no address in the modern sense; the explorer shows the public key itself.

## P2PK and quantum computing
A large enough future quantum computer could, in theory, derive a private key from a visible public key. P2PK outputs reveal their keys before spending, so they come up first in such discussions. Coins locked by hash-based scripts only reveal keys when spent.


## Key takeaways

- P2PK locks coins directly to a public key.
- Most early mined coins use it.
- P2PKH replaced it with a shorter, address-friendly hash lock.

## Common questions

### Can P2PK outputs still be spent?

Yes, with a valid signature from the matching key.

### Is P2PK more vulnerable to quantum computers?

Its public keys are visible on-chain, so it's often mentioned in quantum-risk discussions.

### Do wallets still create P2PK outputs?

Practically never. Modern wallets use SegWit or Taproot.

### How many bitcoins are in P2PK outputs?

A significant amount, mostly early mining rewards from 2009 to 2010 that have never moved.

## Related lessons

- [Pay to public key hash (P2PKH)](https://mybitcoinexplorer.com/learn/p2pkh)
- [Public keys](https://mybitcoinexplorer.com/learn/public-keys)
- [Bitcoin Script](https://mybitcoinexplorer.com/learn/bitcoin-script)
- [The genesis block](https://mybitcoinexplorer.com/learn/genesis-block)
