← GlossaryWallet basics
What Is Pay-to-Script-Hash (P2SH)? Addresses for Complex Spending
Pay-to-script-hash (P2SH), defined in BIP-16, lets an output pay to the hash of a script instead of the script itself, so the sender only needs a short address and the spending conditions are revealed later by the spender.
Key takeaways
- The sender pays to a hash of a redeem script, not to the script.
- The spender later supplies the full script and the data that satisfies it.
- It makes complex conditions, such as multisig, as easy to pay as a simple address.
- The sender pays no extra fee for the receiver's complexity.
The problem
Some outputs need complicated spending conditions, for example 'any two of these three people must sign'. If the sender had to write that whole condition into the output, addresses would be long and the sender would pay the cost of storing it. That is awkward when you just want to be paid.
How P2SH works
BIP-16 changes where the complexity lives. The receiver builds a redeem script that expresses the conditions, hashes it and gives the sender an address that commits to that hash. The sender creates an ordinary-looking output that pays to the hash. Later, when the receiver wants to spend, they provide the full redeem script plus the signatures or data that satisfy it. Nodes check that the script hashes to the committed value and then that it executes successfully.
What the developer guide says
The Bitcoin developer documentation highlights the benefit: a P2SH address has the same properties as a pubkey-hash address, so it can be formatted as a standard address with a small change to tell it apart. That makes collecting a P2SH address as simple as collecting an ordinary one, and the sender does not need to know what is inside.
Common uses
The main use is multisignature. Instead of a sender embedding a multi-key script, they pay to a P2SH address that stands for it. P2SH is also used to wrap SegWit programs for compatibility with wallets that cannot send to native SegWit addresses. The trade-off is that the script stays hidden until spent, so you cannot tell from the address alone what conditions protect the coins.
Example
A small team creates a 2-of-3 multisig redeem script. They hash it and give the exchange a P2SH address that commits to the hash. When they later spend, they reveal the script and supply two valid signatures, and nodes check both.
Put it into practice
Keep track of which addresses are yours
A P2SH address looks different from a single-key address. Scrypt Wallet shows each coin's receive address clearly so you can confirm you are paying the right network.
Create a free wallet Get Scrypt for AndroidSources and verification
Last reviewed 2026-10-02 by the Scrypt Wallet team. The factual claims on this page, and where each comes from:
- BIP-16 defines pay-to-script-hash, in which outputs commit to a script hash and the spender reveals the script later. [1]
- A P2SH address has the same properties as a pubkey hash and can be turned into a standard address with one small change. [2]
Sources
- BIP-16: Pay to Script Hash · bitcoin/bips on GitHub · primary source
- Bitcoin developer guide: Transactions · Bitcoin.org · primary source
Primary sources are protocol papers, specifications, source code or a project's own documentation; secondary sources are wikis and explainers. We checked each claim against the source text on the review date. Found an error? Tell us and we will correct it.
Frequently asked questions
Is a P2SH address the same as multisig?
No. P2SH is the mechanism; multisig is one common script it can hold.
Can I tell what a P2SH address protects?
Not until it is spent, because the address only shows a hash of the script.
Do all coins support P2SH?
Bitcoin-derived coins generally do. Check the specific chain and wallet.
Written by the Scrypt Wallet team · Updated 2026-10-02. General education, not financial, tax or legal advice.