multichain
/index/ /learn/ /bech32-vs-bech32m
learn / bitcoin addresses

Bech32 vs
bech32m.

Read
~5 min
800 words
Level
Inter.
no prior knowledge assumed
Updated
2026-07-30
kept current
Cost
Free
no wallet, no signup
▸ try it live Bitcoin address checker bech32 + bech32m checksums verified locally

Both bc1q… and bc1p… addresses look like the same species, but they use two different encodings: bech32 for SegWit v0, and bech32m for Taproot and beyond. The difference is a single constant in the checksum, and the story of why it exists is a small classic of protocol engineering.

Why bech32 replaced Base58 in the first place

Bitcoin's original address format, Base58Check, was fine but dated: mixed-case (hostile to error-prone typing and inefficient in QR codes), and its 4-byte truncated-hash checksum can tell you that an address is wrong but nothing about where.

Bech32 (BIP-173, 2017) fixed all of that for SegWit addresses. Lowercase-only, a compact character set that excludes lookalikes (no 1, b, i, o), QR-friendly, and a BCH error-detecting code as its checksum (the crown jewel): mathematically guaranteed to detect any error affecting up to four characters, and able to point at the likely error position rather than just failing.

The flaw nobody expected

In 2019, a mundane bug report turned into a cryptographic surprise. If a bech32 string happens to end in the character p, you can insert or delete q characters immediately before that final p and the checksum still verifies. The culprit was the checksum's final XOR constant, the value 1, which interacts badly with the algebra of trailing zeros (the character q encodes zero).

For SegWit v0 this was survivable, because v0 witness programs must be exactly 20 or 32 bytes, a length check that catches the mutation independently. But future witness versions were allowed variable lengths, and Taproot (v1) was on approach. Shipping Taproot on unmodified bech32 would have meant addresses where an accidental (or malicious) length change could pass validation and burn funds.

The fix: change one constant

BIP-350 defines bech32m: the identical algorithm with the final checksum constant changed from 1 to 0x2bc830a3. That single change restores the intended error-detection guarantees for arbitrary lengths. Everything else (character set, human-readable prefix, structure) is untouched.

The rule since then is split by witness version: version 0 keeps bech32 (changing it would have invalidated every existing bc1q address), version 1 and up use bech32m. A correct validator must check both directions: a v0 program encoded with bech32m is invalid, and a v1 program encoded with old bech32 is invalid too. This cross-check is exactly what our validator enforces.

addresswitness ver.encodingtype
bc1q… (42 chars)v0bech32P2WPKH · single key
bc1q… (62 chars)v0bech32P2WSH · script
bc1p…v1bech32mP2TR · Taproot
bc1z…, bc1r…, …v2-v16bech32mreserved for future upgrades

Beyond Bitcoin

The design travels well. Litecoin uses the same scheme with the ltc prefix (and, notably, defines ltc1p Taproot-style addresses even though Taproot is not active on Litecoin mainnet, a trap our Litecoin validator flags). Cosmos-ecosystem chains adopted bech32 wholesale for account addresses, and Lightning invoices use a bech32 variant too.

The deeper lesson: checksums are cryptography-adjacent engineering, and "adjacent" is where surprises live. The bech32 flaw survived four years of expert review and was found essentially by accident. The response, a minimal, surgical, one-constant fix with a clean version boundary, is about as good as protocol remediation gets.

/faq

01

Can I send bitcoin from an old wallet to a bc1p address?

Only if the wallet understands bech32m and Taproot outputs. Wallets from before ~2021 may reject the address (annoying but safe), or worse, mis-encode the payment. If sending fails, update the wallet software rather than working around it.

02

Is bc1p safer than bc1q?

The encoding guarantees are equivalent; bech32m simply restores for variable lengths what bech32 already promised for fixed ones. The differences that matter (key aggregation, script privacy, cheaper spends) come from Taproot itself, not from the address encoding.

03

What was actually wrong with bech32?

If a string ended in "p", inserting or deleting "q" characters right before it preserved the checksum, because the final XOR constant of 1 interacted degenerately with trailing zeros. Fixed-length v0 programs masked the flaw; variable-length future versions would not have.

04

Why do addresses starting with 3 still exist?

P2SH (Base58Check) remains valid and widely used, including for wrapped-SegWit. The ecosystem migrates slowly by design: old formats keep working; new formats add capability. All four generations of address remain spendable.

▸ put it to work Bitcoin address checker bech32 + bech32m checksums verified locally