# What is SegWit (Segregated Witness)?

> SegWit, activated in 2017, revolutionized Bitcoin by fixing transaction malleability, enhancing scalability, and enabling the Lightning Network.

- Source: https://getbittr.com/bittr-academy/bitcoin-inside/what-is-segwit-segregated-witness
- Language: en
- Last updated: 2025-06-25

Segregated Witness (SegWit) is one of the most impactful upgrades in Bitcoin’s history. Activated in  **2017** , SegWit changed how Bitcoin transactions are structured, primarily by  **separating signature data from transaction data** . This solved a critical issue known as  **transaction malleability**  and  **paved the way for the Lightning Network**  and other future innovations. SegWit also increased block size capacity

Despite its benefits, SegWit was highly  **controversial.** 

This article explains how SegWit works, its technical impact, and the key lessons learned from its activation.

A SegWit address starts with either “3…” or with “bc1…..”.  It was activated in Bitcoin Core in 2017. Today over 90% of transactions are using SegWit.

##  **Fixing Malleability** 


One of SegWit’s most important contributions was fixing  **transaction malleability -** a vulnerability that allowed transaction IDs ( **txids** ) to be changed before confirmation.

###  **How it worked before SegWit** 


A Bitcoin transaction contains several components, including:

-  **Inputs**  (where the bitcoin is coming from)
-  **Outputs**  (where the bitcoin is being sent)
-  **Signatures**  (proof that the sender authorized the transaction)
Before SegWit,  **signatures were included in the transaction data** , which meant that an attacker could  **alter**  the signature data slightly without changing the transaction’s validity. This changed the  **txid**  (transaction identifier), which could cause  **problems for protocols that relied on unconfirmed transactions—like the Lightning Network** .

###  **How SegWit solved the Problem** 


SegWit  **separated signature data from transaction data** , moving it to a new section called the  **Witness** . Since the  **txid is now calculated without the signature data** , it can no longer be altered after the transaction is signed.

✅  **No more txid manipulation** 

✅  **Safer unconfirmed transactions** 

✅   **Enables the Lightning Network** 

##  **SegWit enables the Lightning Network** 


The  **Lightning Network**  is a second-layer protocol that enables  **instant, cheap, and scalable Bitcoin transactions** . However, before SegWit, Lightning was  **impractical**  due to the  **transaction malleability issue** .

Since Lightning relies on  **unconfirmed, pre-signed transactions** , malleability attacks could  **disrupt payment channels and cause potential fund loss** . By making txids  **immutable** , SegWit provided the  **foundation for Lightning payments** .

Without SegWit,  **Bitcoin’s ability to scale efficiently would be severely limited** .

##  **How did SegWit Increase the Block Size?** 


Although SegWit was not explicitly designed as a  **block size increase** , it effectively  **increased transaction throughput**  by introducing  **block weight**  instead of block size.

![Image](https://bittr-notion-bucket.s3.eu-central-2.amazonaws.com/notion-media/1fbd2c8de1aa81898849c17eedd5728e.webp)


##  **What is Block Weight?** 


Prior to SegWit, Bitcoin blocks were limited to  **1MB in size (Around 1,650 transactions)** . SegWit introduced  **block weight** , a new method of measuring block size, that allows around 2,700 transactions per block:

-  **Non-witness data (transaction data)**  → Counts  **4 weight units per byte** 
-  **Witness data (signatures, scripts)**  → Counts  **1 weight unit per byte** 
The maximum block weight is  **4 million weight units** , meaning blocks can now fit up to  **4MB worth of transactions** , though most remain between  **1.5MB and 2MB**  on average.

This also lowered the transaction fees through less competition for block space

This upgrade allowed  **Bitcoin to scale without requiring a hard fork** .

##  **SegWit’s New Script Types** 


SegWit introduced  **two new ways**  to send and receive bitcoin:

1.  **Pay-to-Witness-Public-Key-Hash (P2WPKH)** 
    - Similar to the legacy  **Pay-to-Public-Key-Hash (P2PKH)**  format
    - Signature data is moved to the  **Witness** 
    - More efficient and cheaper than legacy transactions

1.  **Pay-to-Witness-Script-Hash (P2WSH)** 
    - A SegWit version of  **Pay-to-Script-Hash (P2SH)** 
    - Used for  **multisig and complex scripts** 
    - Reduces blockchain bloat by keeping script data in the Witness

Both formats help  **reduce fees and increase transaction efficiency** .

##  **Whati is Bech32?** 


SegWit also introduced  **Bech32** , a new address format that improves  **readability and efficiency** .

###  **Bech32 vs. Legacy Addresses** 


-   **Bech32 addresses start with "bc1"** 
-   **They are more space-efficient**  → Lower fees
-   **They have built-in error detection** 
-   **They are fully SegWit-compatible** 
 **Not all wallets and exchanges have adopted Bech32** , but its advantages make it the preferred format for  **optimal fee savings and network efficiency** .

##  **SegWit History and Activation** 


SegWit was first proposed in  **2015**  by  **Pieter Wuille** , but its  **activation was highly controversial** .

 **Miners and some businesses opposed it** , fearing a loss of influence. A group of large Bitcoin companies pushed for a  **hard fork (SegWit2x)** , which would have increased the block size limit to  **2MB,** but this was widely rejected by node operators.

SegWit was activated through  **BIP 148** , a User Activated Soft Fork ( **UASF** ) in  **2017** .

###  **Why did Node Operators oppose SegWit2x?** 


- A  **hard fork**  would have split Bitcoin, creating  **uncertainty and division** .
- Larger blocks would  **increase centralization** , as running a full node would become  **more expensive and not affordable for everyone anymore.** 
- The  **process was seen as an attempted corporate takeover of Bitcoin** .
Ultimately,  **Bitcoin remained decentralized** , and SegWit was activated  **without a hard fork** .

### FAQ



<u>How do different Bitcoin address types look like?</u>

-  **Legacy addresses**  start with  **“1”**  (P2PKH)
-  **Wrapped SegWit addresses**  start with  **“3”**  (P2SH-P2WPKH)
-  **Native SegWit addresses**  start with  **“bc1”**  (P2WPKH, Bech32)
If your Bitcoin address  **starts with “3” or “bc1”** , you are  **using SegWit** .

<u>Can I Send BTC to a SegWit Address?</u>

Yes.  **Legacy, SegWit, and Native SegWit addresses are fully compatible**  with each other. You can send BTC  **from any address type to any other**  without issues.

<u>What’s the Difference between SegWit and Native SegWit?</u>

  **SegWit (P2SH-P2WPKH, “3” address):** 

- More widely supported across  **exchanges and wallets** 
-  **Lower fees**  than legacy, but higher than Bech32
 **Native SegWit (Bech32, “bc1” address):** 

-  **Lowest possible fees** 
-  **Most efficient use of block space** 
- Less supported by some older wallets

If you  **want maximum compatibility** , use  **SegWit (P2SH)** .

If you  **prioritize the lowest fees** , use  **Bech32 (Native SegWit)** .

##  **Takeaways from SegWit** 


The battle over SegWit proved that  **Bitcoin is not controlled by anyone - not miners, developers, or corporations** .

- Bitcoin is dezentralized → The community rejected SegWit2x and kept Bitcoin resistant to corporate influence.
-  Hard Forks are not acceptable in Bitcoin → SegWit activated without disrupting Bitcoin.
-  **SegWit paved the way for future upgrades**  → Lightning Network, Taproot, and improved scalability.
##  **The Impact of SegWit** 


-   **Lower transaction fees** 
-  **Increased transaction throughput** 
-  **Higher miner revenue due to more transactions per block** 
SegWit is now  **used in nearly all Bitcoin transactions**  and has proven to be a  **massive success**  in improving  **Bitcoin’s scalability and efficiency** .

## Final Thoughts


-   **SegWit fixed transaction malleability and enabled the Lightning Network** 
-   **It increased Bitcoin’s effective block size through a soft fork** 
-   **It introduced new transaction types and Bech32 addresses**
