Bech32 (The SegWit Standard)
Bech32 (The SegWit Standard)
With the introduction of Segregated Witness (SegWit), Bitcoin introduced a completely new address format called Bech32 (BIP173). It moved away from the legacy Base58 format to solve several technical and usability issues.
1. The Anatomy of Bech32
A Bech32 address (like bc1q...) is divided into three parts:
-
HRP (Human Readable Part): Usually
bcfor Mainnet ortbfor Testnet. -
Separator: Always the character
1. -
Data Part: The encoded hash + a 6-character checksum.
2. Why Base32?
Bech32 uses a character set of only 32 characters (all lowercase).
-
Case Insensitivity: Unlike Base58, Bech32 is not case-sensitive. You can type it in all caps or all lowercase.
-
QR Codes: Base32 is much more efficient for QR codes, making the codes smaller and easier for phone cameras to scan.
-
No Ambiguity: It removes the characters
b,i,o, and1from the data set to prevent common reading errors.
3. Advanced Error Correction
Legacy Base58Check only tells you if an address is "Wrong." Bech32 uses BCH Codes, which can actually identify where the error is.
-
In theory, a wallet could suggest the correct character if you only made a single mistake.
-
The error detection is mathematically guaranteed to find up to 4 errors and has a vanishingly low chance of missing more.
4. Witness Versions
The first byte of the data part in Bech32 represents the Witness Version.
-
q: Represents Witness Version 0 (Standard SegWit). -
Future Proof: This allowed the network to easily upgrade to version 1 (Taproot) without needing a completely new encoding logic.
5. Comparison: Legacy vs. SegWit
| Feature | Base58Check (1...) |
Bech32 (bc1q...) |
|---|---|---|
| Case Sensitive | Yes | No |
| Character Set | 58 characters | 32 characters |
| Error Detection | SHA256 Checksum | BCH Polynomial |
| QR Efficiency | Medium | High |
In the next section, we will look at the Bech32m upgrade for Taproot.
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: