Why it exists
BIP 16 introduces pay-to-script-hash, or P2SH. It lets a recipient ask for payment to a short commitment to a spending script instead of requiring the sender to handle the complete script. The recipient is responsible for retaining the script and later proving that its conditions are satisfied.
How it works
The funded output commits to a 20-byte hash. When it is spent, the unlocking data supplies a redeem script whose hash must match, plus the signatures or other data that script requires. Validation does not stop at a matching hash: the revealed script must also succeed.
This separates receiving from spending complexity. A sender can pay the address without knowing whether the recipient chose a multisig arrangement or another compatible script. The address representation itself is specified by BIP 13; BIP 16 defines the consensus evaluation. Later SegWit constructions can also use a P2SH wrapper.
A practical example
Three colleagues create a two-of-three redeem script and derive its P2SH address. A customer pays that address without learning the three keys. When two colleagues authorize a payment, the spend reveals the redeem script and their signatures. Backing up only the customer-facing address would not retain the script needed to construct that spend.
What to keep in mind
The spending script becomes public when used, so a script hash is not permanent policy privacy. Script size and execution limits still apply. P2SH also does not turn any arbitrary script into a convenient wallet workflow; the wallet must know the exact script and how to satisfy it.
Status & implementation
Bitcoin Core records P2SH implementation in 0.6.0 and activation on 1 April 2012. It is an established consensus rule, not merely an address-display convention.
Specification status: Deployed · Sources checked 13 November 2026
