P2PKH (Pay-to-PubKey-Hash): What Is P2PKH (Pay-to-PubKey-Hash)?P2PKH (Pay-to-PubKey-Hash), more commonly expanded as Pay-to-Public-Key-Hash, is a Bitcoin transaction output type that locks bitcoin to the hash of a public key.It P2PKH (Pay-to-PubKey-Hash): What Is P2PKH (Pay-to-PubKey-Hash)?P2PKH (Pay-to-PubKey-Hash), more commonly expanded as Pay-to-Public-Key-Hash, is a Bitcoin transaction output type that locks bitcoin to the hash of a public key.It

P2PKH (Pay-to-PubKey-Hash)

2026/08/07 17:37
#Advanced

What Is P2PKH (Pay-to-PubKey-Hash)?

P2PKH (Pay-to-PubKey-Hash), more commonly expanded as Pay-to-Public-Key-Hash, is a Bitcoin transaction output type that locks bitcoin to the hash of a public key.

It is one of the oldest and most widely recognized Bitcoin payment formats.

In simple terms, P2PKH lets someone send bitcoin to an address that represents a hashed public key, and the receiver later spends that bitcoin by revealing the public key and providing a valid digital signature.

A traditional Bitcoin mainnet P2PKH address usually starts with the number

1
.

Bitcoin.org’s developer guide on transactions describes P2PKH as the standard Pay-to-Public-Key-Hash transaction type that lets a sender pay satoshis to a typical Bitcoin address.

P2PKH was important because it gave users a practical address format instead of requiring them to share raw public keys.

The public key is not placed directly in the output when the payment is received.

Instead, Bitcoin stores a shorter hash of that public key in the locking script.

When the receiver spends the funds, the receiver reveals the full public key and a signature.

The network checks that the public key hashes to the same hash in the original output and that the signature is valid for that public key.

This design protects the payment with public-key cryptography while keeping the receiving output compact and easy to share.

Key Takeaways About P2PKH

    • P2PKH stands for Pay-to-PubKey-Hash or Pay-to-Public-Key-Hash.

    • It is a legacy Bitcoin output type used to send bitcoin to the hash of a public key.

    • Mainnet P2PKH addresses usually start with
      1
      .

    • The receiver spends a P2PKH output by providing a public key and a valid signature.

    • The standard P2PKH locking script is
      OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
      .

    • The standard unlocking script is
      .

    • P2PKH is simple and historically important, but it is less fee-efficient than newer address types such as native SegWit and Taproot.

    • P2PKH should be understood by anyone studying Bitcoin transactions, wallet addresses, signatures, and UTXO spending.

Why P2PKH Was Important to Bitcoin

P2PKH was important because it made Bitcoin payments easier for normal users.

Instead of sharing a full public key, a receiver could share a shorter Bitcoin address derived from a public key hash.

This helped make payments easier to copy, display, encode in QR codes, and verify visually.

Bitcoin.org’s glossary describes an address as a 20-byte hash formatted with Base58Check to produce a P2PKH or P2SH Bitcoin address.

That address format gave Bitcoin a user-friendly payment destination before wallets became more advanced.

P2PKH also reduced public key exposure before spending.

The blockchain stores the public key hash when the output is created.

The full public key is revealed only when the output is spent.

This does not make P2PKH a privacy solution, but it does avoid publishing the full public key at the receiving stage.

P2PKH became the classic Bitcoin address type and remains important for reading old transactions, recovering old wallets, and understanding Bitcoin Script basics.

How P2PKH Works

P2PKH works by separating the receiving step from the spending step.

First, the receiver creates a private key and derives a public key from it.

Bitcoin uses elliptic curve cryptography, and Bitcoin.org notes that P2PKH spending relies on public keys and ECDSA signatures over the secp256k1 curve.

The public key is then hashed to create a public key hash.

The public key hash is encoded into a Bitcoin address that the receiver can share.

The sender decodes the address and creates a transaction output locked to that public key hash.

Later, the receiver spends that output by creating a transaction input that references it.

The receiver provides a signature and the original public key.

The Bitcoin network checks that the provided public key hashes to the expected public key hash.

The network also checks that the signature proves control of the matching private key.

If those checks pass and the rest of the transaction is valid, the coins can be spent.

The Standard P2PKH Script

The standard P2PKH locking script is

OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
.

This locking script is also called a

scriptPubKey
.

Bitcoin.org’s transaction guide lists this exact script as the P2PKH pubkey script.

The standard unlocking script is

.

This unlocking script is also called a

scriptSig
.

The two scripts are evaluated together during transaction validation.

The unlocking script first pushes the signature and public key onto the stack.

The locking script then duplicates the public key, hashes it, compares it with the public key hash from the original output, and verifies the signature.

If the public key hash matches and the signature is valid, the output is unlocked.

This script pattern is one of the clearest examples of how Bitcoin Script uses simple stack-based operations to enforce ownership.

What the P2PKH Opcodes Mean

OP_DUP
duplicates the public key on the stack so it can be used for more than one check.

OP_HASH160
hashes the public key using Bitcoin’s standard public key hash process.

is the public key hash that was placed in the original output.

OP_EQUALVERIFY
checks whether the hash of the provided public key equals the stored public key hash.

If the two values do not match, validation fails immediately.

OP_CHECKSIG
checks whether the signature is valid for the provided public key and the transaction data being signed.

Together, these opcodes answer two questions.

The first question is whether the spender revealed the correct public key.

The second question is whether the spender controls the private key linked to that public key.

P2PKH is simple, but this simple pattern is the foundation of many Bitcoin ownership concepts.

P2PKH Addresses

A P2PKH address is a human-readable encoding of a public key hash.

On Bitcoin mainnet, a legacy P2PKH address usually starts with

1
.

That address is not the public key itself.

It is an encoded form of the public key hash plus network and checksum information.

Base58Check encoding helps make the address easier to copy and helps catch some typing errors.

Bitcoin.org’s glossary describes Base58Check as the method used in Bitcoin for converting 160-bit hashes into P2PKH and P2SH addresses.

The address can be shared in text form, shown as a QR code, or used inside a payment request.

Users should still verify the full address before sending funds.

A familiar first character is not enough to prove that the address is correct.

Malware, clipboard attacks, phishing websites, and human error can still replace or corrupt a Bitcoin address.

P2PKH and Public Key Hashing

Public key hashing is central to P2PKH.

The receiver does not give the sender the full raw public key as the payment destination.

The receiver gives an address derived from the hash of the public key.

This hash is shorter than the public key and easier to encode into a standard address.

It also means the full public key is not revealed until the output is spent.

This delay can be useful because the blockchain only needs the public key hash to lock the funds.

When the funds are spent, the public key must be revealed so the network can check the signature.

After a P2PKH output is spent, the public key becomes visible on-chain forever.

This is one reason address reuse is discouraged.

If the same P2PKH address is reused, more transaction history becomes linked to the same public key hash and eventually to the same revealed public key.

P2PKH and Digital Signatures

P2PKH relies on digital signatures to prove spending authority.

A private key creates a signature over transaction data.

The public key lets the network verify that the signature was created by the matching private key.

The private key should never be revealed.

The public key can be revealed when spending.

The public key hash is used in the output before spending.

This design lets Bitcoin verify ownership without requiring a trusted account system.

The blockchain does not know the user’s real-world identity.

It only checks whether the spender can satisfy the cryptographic conditions in the script.

For P2PKH, those conditions are public key hash matching and signature verification.

P2PKH and the UTXO Model

P2PKH is closely tied to Bitcoin’s UTXO model.

UTXO stands for unspent transaction output.

When someone receives bitcoin to a P2PKH address, the transaction creates a new output locked to that address’s public key hash.

That output remains unspent until a later transaction uses it as an input.

To spend it, the later transaction must provide the correct signature and public key.

The old output is consumed completely when spent.

If the user wants to spend only part of the value, the transaction usually creates a new change output back to the user.

This is why wallet software is important.

A wallet must choose UTXOs, build inputs, create change, estimate fees, and sign correctly.

The user may see a simple balance, but the wallet is managing many individual outputs behind the scenes.

P2PKH vs P2PK

P2PK stands for Pay-to-Public-Key.

In P2PK, the full public key is placed directly in the output script.

In P2PKH, only the hash of the public key is placed in the output script.

Bitcoin.org’s developer guide states that pubkey outputs are a simplified form of P2PKH but are not as secure as P2PKH and generally are not used in new transactions.

P2PKH became more common because it produced shorter payment identifiers and delayed full public key exposure until spending.

P2PK is historically important because very early Bitcoin transactions used it.

P2PKH became the more familiar address-based payment model for everyday users.

For most modern users, P2PK is something they may see in historical blockchain analysis rather than in ordinary wallet use.

P2PKH vs P2SH

P2SH stands for Pay-to-Script-Hash.

P2PKH locks funds to the hash of a public key.

P2SH locks funds to the hash of a redeem script.

This makes P2SH more flexible because the redeem script can contain more complex spending conditions.

For example, P2SH is often used for multisignature wallets and compatibility wrappers.

A P2PKH mainnet address usually starts with

1
.

A P2SH mainnet address usually starts with

3
.

Bitcoin.org’s developer guide explains that P2SH was created to let a spender create a pubkey script containing the hash of a second script called the redeem script.

P2PKH is simpler and usually represents one key controlling one output.

P2SH is better when the receiver wants a more complex spending policy while still giving the sender a normal-looking address.

P2PKH vs P2WPKH

P2WPKH stands for Pay-to-Witness-Public-Key-Hash.

It is the SegWit version of a public key hash payment.

BIP141 introduced Segregated Witness, which moved signature data into a separate witness structure and changed transaction weight accounting.

P2PKH stores the signature and public key in the legacy

scriptSig
.

P2WPKH places the signature and public key in witness data instead.

This can make P2WPKH more fee-efficient than P2PKH under Bitcoin’s current weight rules.

Native SegWit addresses use the Bech32 address format described in BIP173.

A native SegWit P2WPKH Bitcoin mainnet address usually starts with

bc1q
.

Many modern wallets prefer native SegWit when the sender and receiver both support it.

P2PKH remains valid, but it is usually considered a legacy format.

P2PKH vs Taproot

Taproot is a newer Bitcoin output type introduced through BIP341.

Taproot uses a different address and spending model from P2PKH.

A Taproot address on Bitcoin mainnet usually starts with

bc1p
.

P2PKH relies on ECDSA signatures and a public key hash script.

Taproot uses Schnorr signatures and can support more advanced spending conditions with improved privacy and efficiency in some cases.

For a simple one-key payment, Taproot can look clean and modern.

For advanced scripts, Taproot can hide unused script paths when spending through the key path.

P2PKH does not provide that same flexibility.

Still, P2PKH remains important because it is part of Bitcoin’s legacy transaction base and still appears in real blockchain data.

Understanding P2PKH helps users understand the older foundation that newer designs improved upon.

Fees and Transaction Size

P2PKH transactions can cost more in fees than newer SegWit-based transaction types for comparable spending behavior.

This is because the signature and public key are included in the legacy input data without the witness discount used by SegWit.

Bitcoin transaction fees depend on transaction weight, fee rate, and network demand.

A P2PKH input is usually larger in virtual size than a P2WPKH input.

When fee rates are low, the difference may feel small.

When fee rates are high, using legacy P2PKH can become noticeably more expensive.

This is one reason many wallets moved from legacy addresses to SegWit addresses.

Users with old P2PKH funds may choose to consolidate or move funds when fees are low.

However, consolidation should be done carefully because it can affect privacy by linking multiple UTXOs together.

Fee savings should be balanced against privacy and operational needs.

Privacy Characteristics of P2PKH

P2PKH provides limited privacy and should not be considered anonymous.

The address does not directly reveal the user’s identity, but all transactions are recorded on the public Bitcoin blockchain.

If the same P2PKH address is reused, observers can link payments to the same address.

When a P2PKH output is spent, the public key is revealed.

That public key can be linked to the previous public key hash.

Address reuse can make it easier for observers to build transaction histories and estimate balances.

Modern wallet best practice is to use a fresh receiving address for each payment when possible.

This does not make Bitcoin perfectly private, but it reduces simple address-based linking.

P2PKH was a major usability improvement in early Bitcoin, but privacy expectations have changed as blockchain analysis has become more advanced.

Users who care about privacy should study UTXO management, address reuse, change outputs, coin control, and wallet behavior.

Security Benefits of P2PKH

The first security benefit of P2PKH is that it uses strong public-key cryptography to control spending.

Only someone with the matching private key can produce the valid signature needed to spend the output.

The second benefit is that the full public key is not revealed until spending.

The third benefit is that the address includes checksum information through Base58Check encoding, which can help detect some copying mistakes.

The fourth benefit is simplicity.

A simple script can be easier to understand and less error-prone than custom script logic.

The fifth benefit is historical compatibility.

Almost every Bitcoin wallet and service that supports normal Bitcoin transactions understands legacy P2PKH addresses.

These benefits explain why P2PKH became so common in Bitcoin’s early years.

However, newer formats can improve efficiency and sometimes privacy without changing Bitcoin’s basic ownership model.

Security Risks of P2PKH

The biggest risk in P2PKH is private key compromise.

If someone steals the private key, they can create a valid signature and spend the funds.

Another risk is weak key generation.

If a wallet creates private keys with poor randomness, attackers may be able to guess or reconstruct the key.

Another risk is address reuse.

Address reuse can reduce privacy and expose more information about the user’s transaction history.

Another risk is user error when copying addresses.

A user who sends funds to the wrong address usually cannot reverse the transaction.

Another risk is old wallet recovery confusion.

Some users may have old P2PKH funds but not understand whether their backup covers all keys and change addresses.

Another risk is higher fee exposure during congested periods.

Legacy P2PKH inputs can be more expensive to spend than newer SegWit inputs.

P2PKH and Wallet Backups

Wallet backups are critical for P2PKH funds.

In early wallets, users sometimes needed to back up wallet files because new private keys could be generated over time.

Modern deterministic wallets usually use a seed phrase to generate many keys from one backup.

However, users should never assume that every old wallet follows modern backup standards.

If a user is recovering old P2PKH funds, the user should understand whether they have a seed phrase, wallet file, private key export, or watch-only address.

A watch-only address cannot spend funds because it does not contain the private key.

A public address alone is not enough to recover bitcoin.

The private key or seed that controls the address is required.

Users should test wallet recovery with small amounts before trusting a backup with meaningful funds.

They should also avoid typing private keys or seed phrases into unknown websites or untrusted software.

P2PKH and Change Outputs

Change outputs are important when spending P2PKH UTXOs.

If a user spends part of a UTXO, the whole UTXO is consumed.

The wallet creates one or more outputs, including a payment output and usually a change output back to the user.

That change output may be P2PKH or another address type depending on the wallet.

If old wallet backups do not include the keys for change addresses, funds can be lost.

This was a bigger issue in older non-deterministic wallets.

Modern deterministic wallets make change management easier because all change addresses can be recovered from the same seed when the wallet follows standard derivation rules.

Users should still understand that a Bitcoin balance is not stored in one account field.

It is made of UTXOs that are selected, spent, and replaced with new outputs.

P2PKH is one of the classic formats for those outputs.

P2PKH and Developers

Developers working with P2PKH need to understand address decoding, script construction, transaction signing, and signature validation.

A P2PKH output must contain the correct public key hash in the locking script.

A P2PKH input must include a valid signature and the matching public key.

The public key must hash to the expected public key hash.

The signature must verify against the transaction data according to Bitcoin’s signing rules.

Developers should avoid writing custom signing logic unless they understand Bitcoin transaction serialization, signature hash types, canonical signatures, dust limits, fee estimation, and network policy rules.

Well-reviewed Bitcoin libraries are usually safer than hand-built transaction code.

A small mistake in transaction construction can cause a transaction to be rejected or, worse, send funds incorrectly.

P2PKH is simple compared with advanced scripts, but it is still real money infrastructure.

Testing on a safe network or with small amounts is essential before handling meaningful funds.

P2PKH and Users

Most users interact with P2PKH through wallet addresses rather than scripts.

A wallet may show a legacy Bitcoin address starting with

1
.

That address usually represents a P2PKH payment destination.

Users can receive bitcoin to that address if the sender supports legacy addresses.

Users can spend funds from that address if their wallet controls the matching private key.

However, users should know that legacy addresses may cost more to spend than SegWit or Taproot addresses.

Users should also avoid reusing the same address repeatedly.

Users with old P2PKH funds should confirm that their wallet backup is complete before moving or consolidating funds.

When sending to a P2PKH address, users should verify the full address carefully.

Bitcoin transactions are not normally reversible after confirmation.

Common Use Cases for P2PKH

The most common historical use case for P2PKH was ordinary Bitcoin payments between users.

Another use case is old wallet recovery, because many early wallets generated P2PKH addresses.

Another use case is compatibility, because legacy P2PKH addresses are widely recognized by Bitcoin software.

Another use case is education, because P2PKH is one of the best scripts for learning how Bitcoin ownership works.

Another use case is blockchain analysis, because many historical Bitcoin transactions use P2PKH outputs.

Another use case is testing basic transaction-building tools, because the script pattern is simple and well documented.

Modern users may prefer newer output types for daily use, but P2PKH remains essential for understanding Bitcoin’s foundation.

It is also important when dealing with inherited wallets, old backups, archived keys, and early transaction data.

Common Misunderstandings About P2PKH

One common misunderstanding is that a P2PKH address is the same as a public key.

It is not because a P2PKH address encodes a public key hash, not the full public key.

Another misunderstanding is that funds are stored inside an address.

They are not because bitcoin exists as UTXOs recorded on the blockchain and locked by scripts.

A third misunderstanding is that a public address can be used to recover funds.

It cannot because the private key or seed is needed to sign spending transactions.

A fourth misunderstanding is that P2PKH is the only normal Bitcoin address type.

It is not because Bitcoin also supports P2SH, native SegWit, and Taproot address types.

A fifth misunderstanding is that old legacy addresses are automatically unsafe.

They are not automatically unsafe, but they may be less efficient and less private than newer wallet practices.

A sixth misunderstanding is that P2PKH hides all identity information.

It does not because transaction activity remains publicly visible on the blockchain.

Best Practices for P2PKH

Use a trusted wallet that explains whether it is creating legacy, SegWit, or Taproot addresses.

Do not reuse P2PKH addresses when a fresh address is available.

Keep seed phrases, private keys, and wallet files offline and secure.

Never type a private key into an unknown website.

Verify the full receiving address before sending bitcoin.

Consider using native SegWit or Taproot for new wallets when supported by the sender, receiver, and wallet software.

Check transaction fees before spending legacy P2PKH funds.

Be careful when consolidating old P2PKH UTXOs because consolidation can link transaction history.

Test recovery with a small amount before trusting an old backup.

Keep wallet software updated so it can properly recognize and spend legacy outputs.

Understand that a P2PKH address alone is not a backup.

The spending secret is the private key or seed behind that address.

P2PKH in One Sentence

P2PKH (Pay-to-PubKey-Hash) is a legacy Bitcoin output type that locks coins to a public key hash and lets the owner spend them by revealing the matching public key and a valid signature.

FAQ

What does P2PKH stand for?

P2PKH stands for Pay-to-PubKey-Hash or Pay-to-Public-Key-Hash.

What is a P2PKH address?

A P2PKH address is a legacy Bitcoin address that represents a public key hash.

What does a P2PKH address start with?

A Bitcoin mainnet P2PKH address usually starts with

1
.

What is the P2PKH locking script?

The standard P2PKH locking script is

OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
.

What is the P2PKH unlocking script?

The standard P2PKH unlocking script is

.

Is P2PKH the same as a public key?

No, P2PKH uses a public key hash, and the full public key is revealed only when the output is spent.

Is P2PKH still valid?

Yes, P2PKH is still valid on Bitcoin, but many modern wallets prefer SegWit or Taproot for better efficiency and newer features.

Is P2PKH more expensive than SegWit?

P2PKH can be more expensive to spend than SegWit because it does not receive the witness discount used by SegWit inputs.

Is P2PKH private?

P2PKH provides limited privacy, but it is not anonymous because transactions are public and address reuse can reveal patterns.

What is the difference between P2PKH and P2SH?

P2PKH locks funds to a public key hash, while P2SH locks funds to a script hash.

What is the difference between P2PKH and P2WPKH?

P2PKH is the legacy public key hash format, while P2WPKH is the SegWit public key hash format that uses witness data.

What is the biggest P2PKH risk?

The biggest risk is losing or exposing the private key that controls the matching public key hash.

Conclusion

P2PKH (Pay-to-PubKey-Hash) is one of the most important building blocks in Bitcoin history.

It created the classic address-based payment model that helped make Bitcoin usable for normal transfers.

A P2PKH output locks coins to a public key hash.

The owner later spends those coins by revealing the public key and providing a valid signature from the matching private key.

This simple structure explains many core Bitcoin ideas, including addresses, UTXOs, public key hashes, locking scripts, unlocking scripts, and digital signatures.

P2PKH is now considered a legacy format because newer designs such as native SegWit and Taproot can offer better efficiency and additional features.

However, legacy does not mean irrelevant.

Many historical transactions, old wallets, and educational examples still use P2PKH.

Anyone who wants to understand Bitcoin deeply should understand how P2PKH works.

For users, the main practical lesson is to protect the private key or seed that controls the address.

For developers, the main technical lesson is that even a simple Bitcoin script must be constructed and signed correctly.

For the Bitcoin ecosystem, P2PKH remains the classic example of how cryptographic ownership works without accounts, passwords, or trusted intermediaries.