THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Nested SegWit vs Native SegWit: What Is the Difference?

permalink THAMER
#bech32#native-segwit#nested-segwit#p2sh

Short answer

Nested SegWit wraps a SegWit witness program inside Pay-to-Script-Hash (P2SH). On Bitcoin mainnet, P2SH addresses commonly begin with 3. Native SegWit uses the witness program directly, typically encoded as a Bech32 address beginning with bc1q for witness version 0.

Explanation

Nested SegWit was useful when some wallets and services could send to P2SH addresses but did not yet understand native SegWit addresses. It provides SegWit spending benefits while retaining a familiar legacy-compatible address format.

Native SegWit removes the extra P2SH wrapper and usually reduces the virtual size of a comparable spend. It also uses a checksummed address format designed for witness programs. Most modern Bitcoin wallets support native SegWit, but interoperability should be checked for older software.

Not every address starting with 3 is Nested SegWit: ordinary P2SH scripts also use that prefix. Likewise, bc1p identifies Taproot's version-1 witness address format, not bc1q native SegWit version 0.

For new integrations, native SegWit is generally more efficient when all participants support it; nested SegWit remains a compatibility option.

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects