What Are P2PKH, P2SH, and SegWit? A Beginner-Friendly Guide to Bitcoin Wallet Addresses
If you’re just getting started with Bitcoin, the names of wallet addresses alone — P2PKH, P2SH, SegWit — can sound confusing. It might feel like you’ve stepped into a world of secret codes and encrypted messages. But don’t worry — things are much simpler than they seem. Let’s break it all down: what these different address formats are, how they work, and why they matter.

First things first: what is a Bitcoin address?
A Bitcoin address is like an account number you can share with others to receive or send cryptocurrency. It’s created from your public key (a part of your wallet), processed through a few cryptographic algorithms, and finally converted into a human-readable format. The address format determines:
- how high the transaction fees are,
- how quickly the transfer is processed,
- and which services and wallets are compatible.
There are currently three main formats: P2PKH, P2SH, and SegWit (Bech32).
The original format: P2PKH — where it all began
This was the first format used in Bitcoin, introduced by its creator Satoshi Nakamoto. P2PKH stands for Pay to Public Key Hash. Don’t worry too much about the technical name — the key thing to remember is that these addresses always start with “1”. For example:
1Kb3Sx1hiXQnXZoJJUWXH3tvbdqjmhyFir
How is this kind of address created?
- Network identifier — a prefix that shows the address belongs to the Bitcoin network. For P2PKH, it’s 0x00 in hexadecimal.
- The public key is hashed twice: first using SHA-256, then RIPEMD-160 — this adds an extra layer of protection.
- A checksum is calculated using another round of double SHA-256 hashing to catch any input errors.
- Everything is then encoded into a readable string using Base58.
What is Base58?
It’s a special way to encode data that removes confusing characters. For example, the letter O, number 0, capital I, and lowercase l all look very similar — Base58 simply skips those. This makes addresses easier to read and type.
Important: Base58 is case-sensitive, so F and f are different characters.
The next step: P2SH — adding flexibility with multisig
In 2012, Bitcoin introduced multisignature wallets, allowing funds to be controlled by multiple people. This required a new type of address format called P2SH (Pay to Script Hash).
These addresses always start with “3” because the network identifier is now 0x05. Once encoded in Base58, it turns into the digit 3. Example:
3QVgQ7JNEkxrabfe9ZQBtS36sGEG58DmLt
What changed?
- Instead of being based on a public key, the address is based on a script (like a multisignature condition).
- The script is hashed, a checksum is added, and the full string is encoded in Base58, just like P2PKH.
- The format enables more complex spending rules and typically lower fees compared to P2PKH.
Even though P2SH addresses look similar to P2PKH, the leading “3” makes it easy for wallets to distinguish between the two.
The modern upgrade: SegWit — faster, cheaper, and safer
In 2017, Bitcoin underwent a major upgrade called Segregated Witness (SegWit). It allowed for:
- smaller transaction sizes,
- lower fees,
- and support for future upgrades (like the Lightning Network).
What’s different?
SegWit introduced a brand-new address format that uses Bech32 instead of Base58. These addresses are easier to read and less prone to errors.
SegWit addresses always start with “bc1”, for example:
bc1rt6rnd3w2uu82wzkl3fhqq263ch37w6lq5sue7
How does a SegWit address work?
- Network identifier — always bc for Bitcoin mainnet.
- The number 1 acts as a separator between the network ID and the actual data.
- The rest of the address contains encoded wallet data and checksum, all in lowercase.
- The address is encoded using Bech32, which is resistant to input errors and easier to validate.
Benefits of SegWit:
- Lower transaction fees due to reduced data size.
- Faster processing — more transactions fit into each block.
- Improved security — helps prevent certain types of attacks.
- Future-ready — required for upcoming features like Taproot.
Downsides?
Some older wallets and exchanges don’t yet support SegWit (bc1) addresses. However, this is becoming less common.
Comparing all three address types
Feature | P2PKH (1…) | P2SH (3…) | SegWit (bc1…) |
Year introduced | 2009 | 2012 | 2017 |
Encoding method | Base58 | Base58 | Bech32 |
Multisignature support | No | Yes | Yes |
Transaction fees | High | Medium | Low |
Compatibility | Maximum | High | Limited (but improving) |
Case-sensitive | Yes | Yes | No |
Recommended for | Legacy systems | Shared wallets | Everyday use |
Why SegWit is the best choice for most users
If your wallet or exchange supports bc1 addresses, SegWit is the smartest option. Here’s why:
- Cheaper transactions
- Faster confirmations
- Higher security
- Fully compatible with other address types
- Future-proof — required for the newest Bitcoin features
Conclusion
P2PKH, P2SH, and SegWit are simply different formats of Bitcoin addresses, each reflecting a stage in the evolution of the network. The older formats still work fine, but SegWit is the modern standard — more efficient, more secure, and better suited for the future.
Now when you see an address starting with 1, 3, or bc1, you’ll know exactly what it means — and which one is best for your needs.