Segregated Witness (SegWit) is a protocol upgrade to the Bitcoin network, formally designated as Bitcoin Improvement Proposal 141 (BIP141), that restructures how transaction data is stored on the blockchain. Proposed by Bitcoin Core developer Pieter Wuille in December 2015, it was activated on August 24, 2017, at block 481,824. The upgrade separates digital signature data, called "witness" data, from the base transaction record and moves it to a distinct structure appended at the end of the transaction. Implemented as a soft fork, SegWit introduced backward-compatible changes that resolved long-standing issues with transaction malleability, increased effective block capacity, and laid the technical groundwork for second-layer solutions such as the Lightning Network.
When Bitcoin launched in 2009, its creator Satoshi Nakamoto did not impose a size cap on blocks. In 2010, Nakamoto quietly introduced a 1-megabyte (MB) block size limit, widely seen as a preventive measure against distributed denial-of-service (DDoS) attacks. For several years, the limit went largely unnoticed because network activity remained modest. As Bitcoin's adoption surged in the early 2010s, this fixed ceiling became a genuine constraint. A full 1 MB block accommodated roughly 1,650 transactions, and as demand exceeded that ceiling, unconfirmed transactions accumulated in the mempool, driving up fees and slowing confirmation times.
The development community began debating solutions around 2015, with the debate growing heated through 2016 and into 2017. One faction favored a straightforward block size increase via a hard fork, while another pushed for a more conservative soft-fork approach. This tension divided miners, developers, and businesses, culminating in one of the most contentious episodes in Bitcoin's history.
A standard Bitcoin transaction before SegWit consisted of two main parts: the transaction data, recording the sender, receiver, and amount transferred, and the unlocking code, which included the digital signature and public key needed to authorize the spend. Both components were bundled together, and the transaction identifier (TXID) was derived by hashing the entire package, signature included.
SegWit changes this arrangement by moving the unlocking code, the "witness," out of the main transaction body into a separate witness field appended at the end. The TXID is then calculated solely from the non-witness portion of the transaction, covering the movement of bitcoin but excluding the validation code. This separation is the origin of the name: the witness data has been segregated.
Digital signatures typically account for roughly 60% of a transaction's total size. Relocating them frees substantial space within each block's primary data area, allowing more transactions without altering the raw 1 MB base limit.
Before SegWit, Bitcoin's protocol had a known flaw called transaction malleability. Because the digital signature was included in the data used to compute the TXID, it was possible to alter the signature in a way that remained cryptographically valid but produced a different TXID. Any node relaying a transaction could manipulate that identifier before confirmation, leaving the sender with an unexpected TXID.
This was not merely a theoretical concern. The 2014 collapse of the Mt. Gox exchange, at the time the largest Bitcoin trading platform in the world, involved transaction malleability as a contributing attack vector. Hackers exploited the flaw to make withdrawals appear unconfirmed while the funds had already moved, ultimately contributing to the loss of over 840,000 BTC.
By excluding signatures from the TXID calculation, SegWit makes transaction identifiers immutable once broadcast. A node can no longer alter the TXID, because the data that produces it contains no mutable signature fields.
To accommodate the reorganized transaction format, SegWit replaced the existing block size metric with a new measure called block weight. Under this system, every byte of legacy transaction data (the base transaction) counts as four weight units, while every byte of witness data counts as one weight unit. The maximum block weight was set at 4,000,000 weight units. A new derived metric called virtual bytes (vbytes) was introduced for fee calculation, defined as weight divided by four.
Because witness data is discounted at a 4:1 ratio, the effective capacity of a block increased significantly. In practice, depending on the mix of transaction types, the effective block size typically ranges between 1.7 MB and 2 MB, without changing the 1 MB base-layer limit. Blocks with more SegWit transactions benefit more from the discount, while those dominated by legacy transactions see less improvement.
SegWit was deployed as a soft fork, meaning the rule changes were backward-compatible. Nodes running older software still recognized SegWit blocks as valid, even if they could not interpret the new witness structure. Those legacy nodes received a "stripped" version of SegWit transactions, with witness data omitted, and could continue participating without upgrading.
The path to activation was contentious. Under the BIP 9 signaling mechanism, SegWit required readiness signals from at least 95% of miners over 2,016 blocks. Between 2016 and mid-2017, a group of predominantly China-based miners blocked the upgrade for months, leveraging their hash rate for negotiating power. The standoff ended when Bitcoin's economic majority coordinated a User-Activated Soft Fork (UASF) through BIP 148, signaling that non-signaling blocks would be rejected after August 1, 2017. This move compelled miner compliance, and on August 9, 2017, 100% of miners between blocks 477,792 and 479,807 signaled support. SegWit locked in and fully activated two weeks later.
The miners and businesses that opposed SegWit and favored a straightforward block size increase pursued a separate path. On August 1, 2017, the day UASF conditions took effect, this faction executed a hard fork and launched Bitcoin Cash (BCH), initially raising the block size limit to 8 MB. Bitcoin Cash forked again in November 2018, raising its limit to 32 MB. The split marked the first major chain division in Bitcoin's history and showed how deeply the scaling debate fractured the community.
A related but distinct proposal called SegWit2x, announced in May 2017 through the New York Agreement, aimed to combine SegWit activation with a subsequent 2 MB base block size increase. Although it briefly held backing from over 90% of miner hash rate, SegWit2x was abandoned in November 2017 after failing to achieve sufficient consensus among developers and the broader user community.
One of SegWit's most consequential long-term effects was making the Lightning Network viable. The Lightning Network is a second-layer payment protocol that routes transactions through off-chain payment channels, settling only the final balances on the Bitcoin blockchain. This dramatically reduces fees and confirmation latency for high-frequency or low-value payments.
Before SegWit, the Lightning Network could not be deployed safely because it relied on unconfirmed transactions. Transaction malleability meant a counterparty could change a TXID, invalidating the off-chain contracts that Lightning channels depended on. With malleability eliminated, those contracts became reliable, and Lightning's first implementation launched shortly after SegWit's activation.
SegWit introduced two new address types alongside its transaction format changes. P2WPKH (Pay-to-Witness-Public-Key-Hash) and P2WSH (Pay-to-Witness-Script-Hash) are the native SegWit locking scripts, both encoded using the Bech32 format. Bech32 addresses begin with the prefix bc1 and are sometimes called "native SegWit" or "bech32" addresses. An earlier compatibility format, P2SH-P2WPKH, wraps a SegWit output inside a traditional Pay-to-Script-Hash structure, producing addresses that start with 3. These were introduced to ease adoption by allowing wallets that had not yet added full Bech32 support to still send funds to SegWit recipients.
SegWit adoption grew steadily after 2017 as exchanges, wallets, and service providers updated their software. By 2024, nearly all Bitcoin transactions used SegWit-compatible address formats, with some estimates placing adoption above 96% of all transactions. Major hardware wallets such as Ledger and Trezor generate SegWit addresses by default, as do most software wallets built on Bitcoin Core version 0.13.1 and later.
SegWit's influence extended beyond Bitcoin. Litecoin was the first major cryptocurrency to activate SegWit, doing so in May 2017, ahead of Bitcoin. Other Bitcoin-derived networks subsequently adopted compatible versions of the upgrade. Within Bitcoin itself, SegWit's script versioning mechanism, which assigns a version byte to witness programs, enabled future upgrades to be introduced more cleanly. The Taproot upgrade, activated in November 2021, was built directly on this versioning foundation. In 2023, SegWit also played an indirect role in enabling Bitcoin Ordinals, a protocol that inscribes arbitrary data onto individual satoshis by embedding content in the witness field of transactions, exploiting the discounted fee rate for witness data.