TeachMeBitcoin

Nested vs. Native SegWit

From TeachMeBitcoin, the free encyclopedia ⏱️ 3 min read

Nested vs. Native SegWit: P2SH-P2WPKH vs. Bech32

To ensure smooth adoption across the global Bitcoin network, developers created two separate formats of SegWit addresses: Nested SegWit (for immediate backward compatibility) and Native SegWit (the optimal, standard format).


🗺️ Structural Comparison

Feature Nested SegWit (P2SH-P2WPKH) Native SegWit (P2WPKH / Bech32)
Address Starts With 3... bc1q...
BIP Standard BIP 141 BIP 173 / BIP 350
Encoding Base58Check Bech32 (Lowercase)
Encoding Case Case-Sensitive (mix of upper/lower) Case-Insensitive (strictly lowercase)
Wrapper Overhead Yes (Wrapped inside a P2SH script) No (Direct native output)
Fee Efficiency ~20% cheaper than legacy P2PKH ~38% cheaper than legacy P2PKH

📦 1. Nested SegWit: The Compatibility Bridge

When SegWit activated, many legacy wallets and exchanges could not immediately upgrade their systems to recognize or send to brand-new native addresses starting with bc1q.

To prevent network fragmentation, Nested SegWit (P2SH-P2WPKH) was introduced:


🎯 2. Native SegWit: Optimal Bech32 Efficiency

Native SegWit (P2WPKH) completely discards the legacy P2SH wrapper, sending funds directly to the SegWit output. It uses the modern Bech32 address format.

🛡️ Core Benefits of Bech32:

  1. Strict Error Correction (BCH Code): Bech32 uses a mathematical Bose-Chaudhuri-Hocquenghem (BCH) checksum code. If a user mistypes up to 4 characters in their address, the wallet will instantly detect the error and block the transaction, preventing coins from being sent to a dead address. It can even locate and correct a single-character typo automatically.
  2. Case-Insensitive lowercase: Bech32 consists entirely of lowercase letters and numbers.
    • This makes the address much easier to read aloud or transcribe manually.
    • It optimizes QR codes: lowercase-only character sets fit into simpler, denser QR patterns, making them significantly faster and more reliable to scan with mobile cameras.
  3. Maximum Fee Savings: By stripping the wrapping code, Native SegWit has the smallest transaction footprint of any Version 0 transaction format, yielding the lowest possible on-chain network fees.
☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!