A visualisation of a P2PK (Pay To Pubkey) Script
  • Hash256
  • Hash160
  • Reverse Bytes


Pay To Pubkey

P2PK (Pay To Pubkey) is a script that locks an output to a public key.

It is a simpler version of the more-commonly used P2PKH lock.


scriptPubKey (locking script)
4104a9d6840fdd1497b3067b8066db783acf90bf42071a38fe2cf6d2d8a04835d0b5c45716d8d6012ab5d56c7824c39718f7bc7486d389cd0047f53785f9a63c0c9dac 04a9d6840fdd1497b3067b8066db783acf90bf42071a38fe2cf6d2d8a04835d0b5c45716d8d6012ab5d56c7824c39718f7bc7486d389cd0047f53785f9a63c0c9d OP_CHECKSIG
hex | opcodes

A P2PK lock just contains a public key and a CHECKSIG opcode.

scriptSig (unlocking script)
483045022100c68e6d5fc26175800bd3094fcd00d5b049aaaba5e47f9a276fbb18a50a2d623502200d7fc6a72cb8a6b2a9e4276a8b76e602692d36d199e45d4beaf1b2dbd3aed0ef01 3045022100c68e6d5fc26175800bd3094fcd00d5b049aaaba5e47f9a276fbb18a50a2d623502200d7fc6a72cb8a6b2a9e4276a8b76e602692d36d199e45d4beaf1b2dbd3aed0ef01
hex | opcodes

When you want to unlock a P2PK lock, you just need to provide a signature for that public key.

Looking for somewhere to safely store your bitcoins? Get a Trezor.

By Greg Walker,

Last Updated: 25 May 2018
  • 25 May 2018: CSS - added subheading styling for h1 (example: glossary/p2pk)
  • 18 May 2018: added link to scriptPubKey
  • 18 May 2018: /glossary/p2pk - first draft

Hey there, it's Greg.

I'll let you know if something seriously interesting happens in bitcoin.

Don't worry, it doesn't happen very often.