What is bech32?

The current, human-readable address format known as Bech32 (pronounced “besh thirty-two”) is mainly utilized for Bitcoin’s Segregated Witness (SegWit) outputs. Pieter Wuille and Greg Maxwell made the proposal in 2017 in BIP 0173 (Bitcoin Improvement Proposal 173).
It is a contemporary encoding system that allows sophisticated features like SegWit transactions and shortens, reads, and is more error-resistant addresses.
Because Bech32 addresses always begin with bc1, they are also known as bc1 addresses.
Why Was Bech32 Introduced?
Prior to Bech32, Bitcoin was mostly used for:
- P2PKH (Pay-to-Public-Key-Hash) Legacy Addresses: These initial ‘1’-based Bitcoin addresses were the original ones. They resulted in greater transaction sizes and higher costs, were case-sensitive, and employed Base58 encoding, which was prone to visual errors due to similar-looking characters (such as “0,” “O,” “l,” and “I”).
- Pay-to-Script-Hash wrapped Pay-to-Witness-Public-Key-Hash nested SegWit addresses (P2SH-P2WPKH): The ‘3’ at the beginning of these transitional addresses allowed SegWit to work with earlier wallets. They were less effective than native SegWit, though, as they continued to use Base58.
- Bech32 was created to overcome these issues and enhance older address forms by making them more effective and intuitive. It offers improved functionality for particular Bitcoin transaction types that are centred on robustness and usability.
Structure of a Bech32 Address
Generally, a Bech32 address is composed of three primary components:
- Human-Readable Part (HRP): This prefix denotes the address’s network or function. It’s ‘bc’ for the Bitcoin mainnet (e.g., bc1). It is ‘tb’ for testnet and ‘bcrt’ for regtest. The HRP is utilised in the checksum computation and is essential for instant identification.
- Separator: ‘1’ is always used here. It divides the data part from the human-readable part.
- Data Part: Encoded in a base-32 alphabet, this contains the address’s essential information. It consists of:
- Witness Version: A single 5-bit number that allows for future updates and indicates the SegWit script version (currently 0 for P2WPKH and P2WSH).
- Witness Program: The real hash of the script or public key that manages the money, transformed from 8-bit bytes to Base32-encoded 5-bit values.
- A 6-character error-detecting code that is computed across the whole HRP, separator, and data is called a checksum.
An example of a full Bech32 address is bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq.
Advantages and Features of Bech32
Bech32 has a number of noteworthy advantages over its predecessors, including:
Enhanced Error Detection and Correction
The main selling point of Bech32 is improved error detection and correction. Compared to Base58Check, it uses a more reliable checksum algorithm (a particular kind of BCH coding). With less than a 1 in 10^9 chance of an error being unnoticed, it can identify the majority of faults as well as any single-character or two-character errors. Sending money to the incorrect address is less likely as a result. Although it can spot mistakes, it doesn’t fix them automatically to stop unwanted mailings.
Better Readability and Usability
Bech32 addresses only contain lowercase characters. This makes addresses easier to read and enter and removes a common Base58 error source (mixing up ‘O’ with ‘0’, ‘l’ and ‘I’).
Case-Insensitivity
Bech32 addresses, in contrast to earlier forms, are case-insensitive, which means that they are accurately recognized independently of the letter casing, significantly lowering the possibility of errors.
Efficiency and Reduced Transaction Fees
Bech32 uses block space more effectively. Because it is the native format for SegWit transactions, consumers pay fewer transaction fees. SegWit separates the witness (signature) data from the primary transaction data, hence lowering the overall transaction “weight”. This speeds up transaction processing by fitting more transactions into each block.
Also Read About Transaction Scheduling & Transaction Executor In Blockchain
QR Code Efficiency
QR codes can be encoded more compactly and efficiently utilizing all lowercase characters and a Base32 alphabet, reducing scanning errors.
SegWit Compatibility
Bech32 addresses are compatible with SegWit, a major Bitcoin scalability and efficiency improvement.
Distinction of Transaction Types
Bech32 separates legacy and SegWit transactions for processing and network compatibility.
Future Compatibility
A “witness version” allows SegWit protocol upgrades without requiring a new address format.
Bech32 Address Creation

Creating a Bech32 address from a public key requires several cryptographic and encoding steps:
- Start with a compressed public key like 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798.
- Hash the public key with SHA-256.
- Hash the SHA-256 result with RIPEMD-160.
- The 8-bit unsigned numbers from step 3 are “squashed” to a 5-bit array (base 2^5=32).
- Add the witness version byte (0 currently) before the 5-bit integer array.
- Calculate the checksum using the HRP (‘bc’ for MainNet, ‘tb’ for TestNet) and step 5 data.
- Checksum step 5’s result.
- Map each 5-bit value to its Bech32 character (qpzry9x8gf2tvdw0s3jn54khce6mua7l).
- The Bech32-encoded address ends with the HRP, ‘1’, and data.
Bech32 and Bech32m
SegWit v0 (P2WPKH and P2WSH) addresses starting with bc1q were originally Bech32 (BIP173). In future SegWit versions, Taproot (SegWit v1) may use Bech32m (BIP350), a modified variation. Taproot addresses start with bc1p. Bech32m solves a tiny problem in the original Bech32 that affected some future witness versions, requiring wallet and service updates for Taproot.
Native segwit outputs are paid using the Bech32 and Bech32m address formats.
The bech32 address format, which consists of just 32 letters and numbers and does not employ mixed case, has an error-correction mechanism that can detect nearly all address errors (and in certain situations, even pinpoint the location of the typos). Addresses are forward-compatible with a wide variety of potential upgrades because they encode a SegWit version.
A new bech32 modified (bech32m) format was suggested after an issue with bech32 error detection for upcoming upgrades under certain uncommon scenarios was found. Wallets and services that incorporate support for paying the original bech32 address format must upgrade if they wish to support paying taproot addresses and future upgrades, as bech32m is anticipated to be utilized for taproot and future SegWit-based script upgrades. To continue paying for the original (version 0) SegWit addresses for P2WPKH and P2WSH scripts, there is no need to upgrade.
Also Read About What Is A Bitcoin Address, Types And How Does It Works
Bech32 vs Bech32m
Feature | Bech32 | Bech32m |
---|---|---|
Introduced In | BIP 173 | BIP 350 |
Purpose | Encoding SegWit v0 addresses | Encoding SegWit v1 and future versions |
Checksum Constant | 1 | 0x2bc830a3 |
Error Detection | Good | Improved |
Used For | Legacy SegWit (v0) addresses | Taproot (v1) and forward compatibility |
Address Prefix Example | bc1q... (for Bitcoin) | bc1p... (for Bitcoin) |
Checksum Validation | Fails for Bech32m-style addresses | Passes for Bech32m |
Backward Compatibility | Not compatible with Bech32m addresses | Not compatible with Bech32 addresses |
Application and Acceptance
As of October 2020, many popular wallets support the Bech32 address format, the preferred address scheme. SegWit has been adopted by major Bitcoin wallets, exchanges, and services since its activation. Because of its efficiency and error-detection, it’s the preferred address format for receiving and creating Bitcoin wallets. Despite compatibility between Legacy, SegWit, and Native SegWit addresses, not all major systems support sending Bitcoin to a bc1 address. The bc1 prefix may first be misleading to certain users.
Think about Bech32 as a high-security, contemporary digital lock that replaces more antiquated, cumbersome locking systems on a vault. In addition to being sluggish to operate, the old locks (Base58) may have had difficult combinations where ‘0’ may have been mistaken for ‘O,’ making it simple to make a mistake when attempting to unlock them. Similar to a new, simplified combination method, Bech32 employs only distinct, clear characters (all lowercase), has an integrated alert that sounds loudly if you type even one digit incorrectly, and is made to open the vault considerably more quickly and effectively (with cheaper fees). In order to facilitate future upgrades without requiring the installation of a completely new lock, it even has a “version number” on the lock.
Also Read About P2MS Bitcoin: The Basics Of Collaborative Fund Management
Summary table
Property | Bech32 |
---|
Introduced in | BIP-173 |
Used for | Native SegWit (P2WPKH, P2WSH) |
Starts with | bc1 |
Advantages | Lower fees, error detection, QR-friendly, SegWit support |
Supported on mainnet? | ✅ |
Supported on testnet? | ✅ (tb1 ) |