Skip to definition

Transactions & network Advanced

P2SH (Pay to Script Hash)

In brief An output that locks coins to a script hash, so its address alone does not reveal the full spending rules.

Also referred to as: pay to script hash · pay-to-script-hash · script-hash output

Full explanation

A transparent output type that commits to a spending script through its hash. The spender supplies the redeem script and the data needed to satisfy it. P2SH can wrap different conditions, including multisignature arrangements and nested SegWit; the address format alone does not identify the exact spending conditions.

For exampleA P2SH output can contain P2SH-P2WPKH, but a wallet must identify that construction before you use the nested single-key fee model.

Common mistakeTreating every P2SH output as nested SegWit or assuming that all P2SH inputs have the same size.

Try it live: Quick prefix detector

Put it into practice: Convert between 3-prefix and M-prefix P2SH →

Primary sources: BIP 16: Pay to Script Hash Litecoin Core: script-type recognition

Definition checked:

Quick answers about P2SH (Pay to Script Hash)

What does P2SH (Pay to Script Hash) mean in Litecoin?
An output that locks coins to a script hash, so its address alone does not reveal the full spending rules. A transparent output type that commits to a spending script through its hash. The spender supplies the redeem script and the data needed to satisfy it. P2SH can wrap different conditions, including multisignature arrangements and nested SegWit; the address format alone does not identify the exact spending conditions.
What is a common mistake with P2SH (Pay to Script Hash)?
Treating every P2SH output as nested SegWit or assuming that all P2SH inputs have the same size.
How is P2SH (Pay to Script Hash) applied in practice?
A P2SH output can contain P2SH-P2WPKH, but a wallet must identify that construction before you use the nested single-key fee model. You can explore this hands-on with our Convert between 3-prefix and M-prefix P2SH.
Jarosław Wasiński
Editor-in-chief · Financial markets and Litecoin education

Editor-in-chief of Litecoin.watch and founder of MyBank.pl. His published work covers foreign exchange, financial education and Litecoin. On Litecoin.watch, his remit includes editorial direction, source transparency and the practical guides and research published by the site.

Background, selected work and editorial responsibility →

Founder of MyBank.pl Financial education and market analysis Named editorial responsibility