💡 The Plain-English Definition
These are the four main Bitcoin script types — the different ways bitcoin can be locked and unlocked. Each one represents a generation of technical progress in how Bitcoin handles a transaction’s security, efficiency, and privacy.
🤔 But Why Though?
Every Bitcoin transaction output — each chunk of bitcoin a transaction creates — is locked by a script, a set of conditions that must be met to spend it. The script type decides what those conditions look like, how much space the transaction takes up, and what information ends up visible on the blockchain. Each generation fixed limitations of the one before.
P2PKH (Pay-to-Public-Key-Hash) is the original format, giving addresses that start with 1. It locks funds to the hash — the fingerprint — of a public key. To spend, the owner has to reveal the full public key and provide a valid signature. It’s secure and well proven, but it’s the largest transaction format, so it carries the highest fees.
P2SH (Pay-to-Script-Hash) gives addresses that start with 3. Instead of locking to a key directly, it locks to the hash of a spending script — a small program that can set richer conditions, like requiring several keys (multisig). The clever part is that those conditions stay hidden until the moment you spend, so a complex wallet can look like an ordinary payment until then.
P2WPKH (Pay-to-Witness-Public-Key-Hash) is the SegWit version of P2PKH, giving the bc1q addresses. It arrived with SegWit — Segregated Witness, the 2017 upgrade that moved signature data out of the main body of a transaction. The signature now sits in a separate “witness” section, which gets a size discount under SegWit’s rules. The result is smaller effective transactions, lower fees, and a fix for transaction malleability — an old bug where a transaction’s ID could be altered before it confirmed — which is what made the Lightning Network practical.
P2TR (Pay-to-Taproot) is the newest format, giving bc1p addresses, activated in November 2021. A Taproot output can be spent either with a single key (looking like any ordinary payment) or through a script that reveals more complex conditions. The key point is that on the blockchain, a single-key spend and a multisig spend look identical. It uses Schnorr signatures — a newer signature scheme that allows key aggregation, combining several keys into one — instead of the older ECDSA scheme.
🌍 The Real-World Analogy
Think of these script types like four generations of door lock. The original mortise lock (P2PKH) works reliably but needs a big, visible mechanism. The combination lock (P2SH) hides what’s inside the safe until you open it. The electronic keypad (P2WPKH) is smaller and more efficient, and it fixes a flaw where someone could change the combination mid-entry. The biometric scanner (P2TR) is the most modern — you can use it as a simple fingerprint reader or a full access-control system, and from the outside the two look identical.
⚡ So What?
Use P2TR (bc1p) addresses if your wallet supports them — they give the best fee efficiency, the best privacy (a multisig spend can’t be told apart from a single-key one), and the best footing for future Bitcoin upgrades. P2WPKH (bc1q) is the next best option. Avoid sending to legacy 1… addresses unless the recipient requires it, since that costs you, the sender, more in fees. Understanding script types also explains why different wallet formats carry different fees and different privacy implications.
