Bitcoin transactions can feel unpredictable: Address formats look unnecessarily confusing, and technical terms like block weight rarely make the situation clearer. But one upgrade sits behind many of the improvements you now take for granted—from lower-cost transactions to the Lightning Network. That upgrade is Segregated Witness, better known as SegWit.
What Is SegWit?
Segregated Witness, or SegWit, is a Bitcoin protocol upgrade that changed how transaction data is structured. It was deployed as a soft fork and activated on August 24, 2017, at block height 481,824.
Before SegWit, Bitcoin transactions stored inputs, outputs, scripts, and transaction signatures in one structure. SegWit moved signatures and related scripts—the witness data—into a separate structure. The original portion still contains details such as inputs, outputs, and receiver data, while the witness portion contains the unlocking signature and other validation data.
BIP-141 defines SegWit’s main consensus rules. Bitcoin Core 0.13.1 implemented the upgrade, while BIP-9 version bits provided the original activation mechanism. During the activation window, miners signaled readiness, and SegWit locked in during a target adjustment period.
Because SegWit was a soft fork, it didn’t invalidate older Bitcoin transactions or legacy addresses. Older nodes could continue following the blockchain, while upgraded nodes applied the new witness rules.
Why Was SegWit Added to Bitcoin?
SegWit was proposed in 2015 during Bitcoin’s block-size debate. Transaction demand was growing, but the 1 MB block size limit restricted how many transactions miners could include in each block. When demand increased, users often paid higher fees and waited longer for confirmation.
A direct block size increase would’ve required a hard fork. SegWit took a more flexible approach by changing how transaction data counted toward block capacity while also addressing transaction malleability.
The SegWit upgrade had four main goals:
- Reduce transaction malleability. Separating signature data from the transaction ID calculation made transaction identifiers more reliable.
- Increase effective block capacity. Witness data counts less toward the block weight limit, allowing more transactions to fit into a block.
- Support payment channels. Reliable transaction IDs made Layer 2 systems such as the Lightning Network safer to build.
- Support future upgrades. SegWit introduced versioned witness programs later used by Taproot.
What Problems Does SegWit Solve?
1. Transaction Malleability Reduction
Transaction malleability allowed parts of an unconfirmed transaction to change without invalidating the payment. In Bitcoin’s original format, signature data contributed to the transaction hash used to create the transaction ID, or txid. Changing the signature’s encoding could therefore create a different txid even when the payment details stayed the same.
SegWit excludes witness data from the traditional txid calculation. Signature changes can still affect the witness transaction ID, or wtxid, but they don’t change the txid of a properly constructed SegWit spend. BIP-147 also introduced the NULLDUMMY rule to fix another malleability issue involving multisignature transactions.
2. More Efficient Use of Block Space
Before SegWit, every transaction byte counted equally toward Bitcoin’s 1 MB maximum size. SegWit introduced block weight, which gives witness data less weight than base transaction data.
As a result, signatures use less of the block’s effective capacity. Blocks can contain more transactions when users spend SegWit-enabled outputs, especially in transactions with several inputs or multiple signatures.
SegWit doesn’t remove signatures from the blockchain. Full nodes still receive and validate witness data. The upgrade only changes where that data appears and how it counts toward block capacity.
3. Better Fee Efficiency for SegWit Spends
Bitcoin transaction fees depend on virtual size and the fee rate you choose. Because witness bytes receive a discount, SegWit transactions usually have a smaller virtual size than comparable legacy transactions.
This can produce lower transaction fees, but there’s no fixed saving. Costs depend on the number and type of inputs, the address format, and current network demand. Native SegWit transactions can often save around 30% compared with similar legacy transactions, while multi-input or multisignature transactions may save more.
4. Safer Foundation for Payment Channels
Payment channels depend on transactions that reference earlier txids. Before SegWit, transaction malleability could change a channel’s funding txid and invalidate dependent transactions.
By making txids more reliable, SegWit created a safer foundation for the Lightning Network and other Layer 2 payment systems.
5. Cleaner Upgrade Path for Future Bitcoin Improvements
SegWit introduced a witness version byte. Version 0 defines the original P2WPKH and P2WSH output types, while version 1 later became the basis for Taproot.
This versioning system lets Bitcoin add new script rules through future soft forks without creating an entirely separate transaction format each time.
How to Get Free Crypto
Simple tricks to build a profitable portfolio at zero cost
How Does SegWit Affect Bitcoin Block Size and Block Weight?
Block Weight Instead of Simple Block Size
SegWit replaced the old 1 MB consensus limit with a maximum block weight of 4,000,000 weight units. BIP-141 defines block weight as:
Block weight = base size × 3 + total size
Base size excludes witness data. Total size includes it. Each base byte therefore contributes four weight units, while each witness byte contributes one.
This system increases effective block capacity without setting one fixed new block size. The amount of data that fits depends on the mix of legacy and SegWit transactions.
Base Size and Total Size
Base size covers the transaction data older nodes understand, including inputs, outputs, and locktime. It excludes the separate witness structure.
Total size, meanwhile, includes both base data and witness data. For legacy transactions, base size and total size are the same. For SegWit transactions, total size is larger because it includes signatures and scripts in the witness section.
Witness Data Discount
Each base byte contributes four weight units, while each witness byte contributes one. This is often described as a 75% witness discount. The data isn’t compressed or partly removed. It simply uses less of the 4,000,000-unit block weight limit.
Virtual Bytes and Fee Calculation
Wallets calculate fees using virtual transaction size, or vsize:
Virtual size = transaction weight ÷ 4, rounded up
A transaction weighing 1,000 weight units has a virtual size of 250 virtual bytes. At 10 sat/vB, the fee would be 2,500 satoshis.
The Common 4 MB Block Misconception
SegWit didn’t simply increase Bitcoin’s block size to 4 MB. A block could only approach 4 MB if nearly all its data were witness data, which isn’t realistic because every transaction also requires base data.
The correct limit is 4,000,000 weight units. Real block size varies depending on the transactions included.
How Does SegWit Affect Bitcoin Transaction Fees?
SegWit can lower fees because spending a SegWit output usually creates a smaller virtual transaction size. The benefit depends mainly on the inputs you’re spending, not only on the address receiving the bitcoin.
Your final fee depends on:
- Transaction structure. More inputs, outputs, and signatures increase transaction size.
- Address type. Native SegWit inputs are generally more efficient than nested SegWit inputs, while legacy inputs are usually the largest.
- Network demand. When many users compete for block space, fee rates rise across the entire network.
Basically, SegWit doesn’t directly increase Bitcoin transaction speed or shorten the average block interval. Instead, it makes your transaction more space-efficient, which may help it confirm at a lower fee rate.
What Are SegWit Address Types?
Bitcoin addresses show wallets how an output can later be spent. SegWit introduced new formats, but legacy addresses remain valid:
- Legacy addresses beginning with 1. These P2PKH addresses use Bitcoin’s original format. Spending from them doesn’t receive the witness discount, so they usually create larger transactions.
- Nested SegWit addresses beginning with 3. These addresses place a witness program inside Pay to Script Hash, or P2SH. They were designed to improve compatibility with older wallets and exchanges. Not every address beginning with 3 is a SegWit address.
- Native SegWit addresses beginning with bc1q. These Bech32 addresses represent version 0 witness programs directly and usually offer lower fees than nested SegWit.
- Taproot addresses beginning with bc1p. These Bech32m addresses use witness version 1. Taproot builds on SegWit’s witness versioning but isn’t a SegWit v0 address type.
On top of that, SegWit v0 includes two main output types:
- P2WPKH: Pay to Witness Public Key Hash uses a 20-byte public key hash and is common in single-signature wallets.
- P2WSH: Pay to Witness Script Hash uses a 32-byte script hash and supports multisignature wallets and more complex spending conditions.
For everyday payments, a native SegWit bc1q address usually offers the best balance of compatibility and lower fees. Before you receive Bitcoin, check that the sending wallet or exchange supports the address format.
How Is SegWit Related to the Lightning Network?
The Lightning Network is a Layer 2 protocol that lets users make payments through channels instead of recording every transfer directly on the Bitcoin blockchain. Users lock bitcoin in a funding transaction, exchange updated balances off-chain, and later settle the final result on-chain.
These channels depend on reliable transaction IDs. Before SegWit, transaction malleability could change a funding txid and break transactions that referenced it. SegWit removed this obstacle for SegWit spends by excluding witness data from the txid.
SegWit also reduces the virtual size of many channel-opening and channel-closing transactions. It didn’t create the Lightning Network, but it made secure and practical payment channels much easier to implement.
What Are the Main Technical Components Behind SegWit?
Below is a quick glossary of the essential components related to SegWit.
- Witness data: Signatures and scripts separated from the base transaction data.
- Script witness: The witness items attached to a SegWit transaction input.
- Transaction ID (txid): The identifier calculated without witness data.
- Witness transaction ID (wtxid): The identifier calculated with witness data included.
- Witness program: A script component that defines how a SegWit output can be spent.
- Witness commitment: Data in the coinbase transaction that commits the block to all included witness data.
- Block weight: Bitcoin’s post-SegWit block capacity metric, limited to 4,000,000 weight units.
- Virtual transaction size: The size metric wallets use to calculate fees.
- P2WPKH and P2WSH: The two main SegWit v0 output types.
- Bech32 address: The address format used for native SegWit v0 outputs.
Which Bitcoin Improvement Proposals Define SegWit?
SegWit is defined by several related Bitcoin Improvement Proposals:
- BIP-141: Consensus Rules. Defines witness programs, witness commitments, block weight, P2WPKH, and P2WSH.
- BIP-143: Signature Digest Changes. Improves signature verification and includes the value of the input being spent, which is useful for hardware wallets.
- BIP-144: Peer-to-Peer Relay Changes. Defines how upgraded nodes send and request transactions and blocks containing witness data.
- BIP-147: NULLDUMMY Rule. Fixes an additional multisignature transaction malleability issue.
- BIP-173: Bech32 Address Format. Defines the original address encoding used for native SegWit outputs.
What Are the Benefits and Limitations of SegWit?
SegWit improves how Bitcoin handles transaction data, but it doesn’t remove every network limitation. Its main benefits relate to efficiency, fees, and future upgrades, while its drawbacks mostly affect adoption and user experience.
| Benefits | Limitations |
| Reduces known forms of transaction malleability. | You only receive the main fee benefits when spending SegWit-enabled outputs. |
| Allows more transactions to fit within the block weight limit. | Network congestion can still cause higher fees. |
| Often produces lower transaction fees. | SegWit doesn’t increase the block size to a fixed 4 MB. |
| Supports the Lightning Network and other Layer 2 systems. | Multiple address formats can confuse new users. |
| Provides a versioned structure for future Bitcoin upgrades. | Witness data remains part of block validation and storage. |
| Preserves compatibility with legacy addresses and older nodes. | SegWit doesn’t remove Bitcoin’s overall capacity limits. |
Final Thoughts
SegWit fixed transaction malleability, introduced block weight, lowered the virtual size of many transactions, and helped make the Lightning Network practical. For you, the main advantage is straightforward: A crypto wallet that supports native SegWit addresses can usually send bitcoin more efficiently. Fees and confirmation times can still rise during congestion, but SegWit helps you use limited block space more effectively.
Disclaimer: Please note that the contents of this article are not financial or investing advice. The information provided in this article is the author’s opinion only and should not be considered as offering trading or investing recommendations. We do not make any warranties about the completeness, reliability and accuracy of this information. The cryptocurrency market suffers from high volatility and occasional arbitrary movements. Any investor, trader, or regular crypto users should research multiple viewpoints and be familiar with all local regulations before committing to an investment.


