Overview
Pay-to-Witness-Public-Key-Hash (P2WPKH) is the native SegWit equivalent of P2PKH. It functions identically in terms of security — locking funds to a public key hash — but restructures where signature data is stored in the transaction. By moving signatures into the segregated witness section, P2WPKH transactions benefit from the witness discount, resulting in significantly lower fees.
How P2WPKH Works
Unlike P2PKH, a P2WPKH output has an empty scriptSig. The signature and public key are placed in the witness field instead.
P2PKH Transaction: P2WPKH Transaction:
┌───────────────────┐ ┌───────────────────┐
│ scriptSig: │ │ scriptSig: │
│ <sig> <pubkey> │ │ (empty) │
├───────────────────┤ ├───────────────────┤
│ scriptPubKey: │ │ scriptPubKey: │
│ OP_DUP │ │ OP_0 │
│ OP_HASH160 │ │ <20-byte hash> │
│ <hash> │ ├───────────────────┤
│ OP_EQUALVERIFY │ │ witness: │
│ OP_CHECKSIG │ │ <sig> <pubkey> │
└───────────────────┘ └───────────────────┘
Counts fully toward Witness data gets
block weight 75% discount
Fee Savings
The witness discount counts witness bytes at one-quarter the weight of non-witness bytes. For a typical single-input, two-output transaction, P2WPKH saves roughly 38% in fees compared to P2PKH. This discount was introduced to incentivize adoption of SegWit without requiring a hard fork to increase block size.
Address Format
P2WPKH addresses use Bech32 encoding and begin with bc1q on mainnet. Bech32 addresses are case-insensitive, use only lowercase alphanumeric characters (no 1, b, i, or o to avoid visual confusion), and include a built-in error-detection checksum.
Compatibility
Most modern Bitcoin wallets and exchanges support sending to P2WPKH (bc1q) addresses. For cases where a sender's wallet does not support Bech32, nested SegWit (P2SH-P2WPKH) wraps the SegWit script inside a P2SH output, producing a 3-prefixed address that any wallet can send to, while still providing partial fee savings to the spender.
When to Use P2WPKH vs P2TR
While P2WPKH remains widely used, the newer P2TR format offers additional privacy benefits and slightly better efficiency for key-path spends. New wallets are increasingly defaulting to Taproot addresses, though P2WPKH continues to be fully supported and secure.