Segregated Witness (SegWit) is an upgrade to the Bitcoin blockchain that separates the "witness", the signatures and scripts proving a transaction is authorised, from the rest of the transaction data. It was specified mainly in BIPs 141, 143 and 144, proposed by developer Pieter Wuille in December 2015, and activated as a soft fork at block 481,824 on 24 August 2017.
SegWit did two things at once. It fixed transaction malleability, a long-standing flaw that let third parties alter a transaction's ID before confirmation, and it replaced Bitcoin's one-megabyte block size limit with a "block weight" limit that lets more transactions fit in each block. Its fight to activation was the centre of the 2015–2017 block size debate, which also produced the hard fork that created Bitcoin Cash (BCH).
SegWit in plain terms
Think of a parcel with a long signed delivery form taped to the outside. The courier charges by the size of the whole parcel, form included, and the parcel's tracking number is printed from everything on it, so if anyone smudges the form the tracking number changes. That makes it hard to plan the next delivery that depends on this one.
SegWit moves the signed form into a separate envelope that travels alongside the parcel. The tracking number is printed only from the contents, so it no longer changes when the form is touched. The courier also gives the envelope a discount, so more parcels fit in each van.
How SegWit works
Before SegWit, a transaction's ID was the hash of all its data, including signatures. Because there are several valid ways to encode the same signature, anyone relaying a transaction could change its encoding and therefore its ID without invalidating it. That broke software that tracked payments by ID and made chains of unconfirmed transactions unsafe, which in turn blocked payment-channel designs.
SegWit computes the transaction ID without the witness data and commits the witness separately through a second Merkle tree whose root is placed in the block's coinbase transaction. Old nodes that do not understand SegWit see these outputs as spendable by anyone and receive blocks with the witness data stripped out; upgraded full nodes verify everything. That is what makes it backward compatible.
Block weight and capacity
SegWit replaced the size limit with a weight limit of 4,000,000 weight units per block. BIP 141 defines a transaction's weight as:
- is the size in bytes of the transaction serialised without witness data.
- is the size in bytes including witness data.
- Virtual size, used for fee rates, is the weight divided by 4, rounded up.
Worked example: a transaction with a base size of 200 bytes and a witness of 200 bytes has a total size of 400 bytes, so its weight is weight units and its virtual size is vbytes. The same transaction without the witness discount would count as 400 bytes. In effect, each witness byte costs a quarter of a normal byte, so the fee for SegWit spends is lower and a block can hold more than one megabyte of data in total.
Addresses and adoption
SegWit can be used in two forms. "Nested" SegWit wraps it inside a Pay-to-Script-Hash output, giving addresses beginning with 3 that older wallets could already pay. "Native" SegWit uses the bech32 address format from BIP 173, with mainnet addresses starting bc1q. Taproot, activated in November 2021, built on SegWit's versioning: it is "witness version 1", with addresses starting bc1p in the bech32m format of BIP 350.
Adoption was gradual because each wallet, exchange and payment processor had to add support, but SegWit spends became the majority of Bitcoin transactions within a few years.
Impact and criticism
By ending malleability, SegWit cleared the way for the Lightning Network, which relies on pre-signed transactions that spend outputs not yet confirmed. Its script versioning made later upgrades such as Taproot simpler to deploy, and its fee discount encouraged wallets to consolidate unspent outputs more efficiently.
The road there was contentious. Many miners withheld BIP 9 signalling for months. Some users threatened a user-activated soft fork (BIP 148), and a group of companies backed the New York Agreement of May 2017, pairing SegWit with a later doubling of block size known as SegWit2x. SegWit locked in, but the SegWit2x hard fork was suspended in November 2017. Large-block advocates had already left to form Bitcoin Cash, arguing that SegWit was a complicated substitute for simply raising the limit.
A later debate concerns the witness discount itself. Since 2023, Ordinals inscriptions have stored images and text in witness data, using the cheaper weight to put non-payment data on chain. Supporters see this as legitimate use of block space; critics say it was never the purpose of the discount and raises the cost of running a node. Like every Bitcoin rule change, any response would have to pass through the BIP process and the network's consensus rules.