Bech32 Encoding: The SegWit Standard
Bech32 Encoding: The SegWit Standard
With the activation of Segregated Witness (SegWit), Bitcoin moved away from the legacy Base58 format to a more modern, efficient standard called Bech32 (BIP173). It is the encoding that powers all addresses starting with bc1.
1. Why a new standard?
Base58 served Bitcoin well for years, but it had several technical drawbacks:
-
Case Sensitivity: Mixing upper and lowercase made it harder to dictate addresses over the phone.
-
QR Code Bloat: Base58 is inefficient for QR codes, requiring larger, more complex squares.
-
Slow Math: The "Successive Division" used in Base58 is computationally expensive for large payloads.
2. The Native SegWit Look
Bech32 addresses are long and lowercase.
Example: bc1qar0srr7xfkvy5l643lydnw9re59gtzzwf5mdq3
While they look longer than legacy addresses, they are actually More Efficient for the network to process and cheaper for you to spend from.
3. The Components of Bech32
Every Bech32 string is composed of three distinct parts:
-
HRP (Human-Readable Part): Tells you which network you are on (
bcfor Mainnet). -
Separator: The number
1. This is always present and tells the computer where the data begins. -
Data Part: The encoded information, including the Witness Version, the Hash, and the Checksum.
4. Total Case Insensitivity
Bech32 is defined as Case Insensitive. While standard usage is lowercase, an address in ALL CAPS is mathematically identical. This makes it impossible to make a mistake by accidentally hitting the Caps Lock key.
| Feature | Base58 | Bech32 |
|---|---|---|
| Address Prefix | 1 or 3 |
bc1 |
| Case Sensitive? | Yes | No |
| QR Efficiency | Medium | High |
| Error Detection | Hash-based | Polynomial-based |
In the next section, we will analyze the Base32 Alphabet used in this standard.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: