THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Bech32 and Bech32m Addresses: bc1q vs bc1p

permalink THAMER
#bc1p#bc1q#bech32m#bip173#bip350#bitcoin-bech32

Bitcoin addresses beginning with bc1 are commonly associated with native SegWit outputs on mainnet. The prefix alone does not tell you everything about the output: the witness version, program length, and checksum variant all matter.

What is Bech32?

BIP173 specifies Bech32, a human-readable encoding used for native SegWit addresses. A mainnet SegWit address uses the human-readable part bc; testnet uses tb. The address contains a witness version and a witness program encoded into a checksummed string.

Bech32 was originally specified for witness version 0 addresses, such as P2WPKH and P2WSH.

Why was Bech32m introduced?

BIP350 introduces Bech32m, a checksum variant used for SegWit witness versions 1 through 16. Witness version 0 must use the original Bech32 checksum; witness versions 1–16 must use Bech32m.

This distinction is a validation rule, not merely a display preference. Software that accepts the wrong checksum variant can mishandle addresses.

What is the difference between bc1q and bc1p?

| Typical prefix | Witness version | Common output type | Checksum |
| --- | --- | --- | --- |
| bc1q | 0 | P2WPKH or P2WSH | Bech32 |
| bc1p | 1 | P2TR (Taproot) | Bech32m |

These are common mainnet forms. Validate the complete decoded address rather than relying on the first four characters alone. A tb1 address belongs to testnet; signet also commonly uses tb1.

What should an address validator check?

  1. The network's human-readable part, such as bc or tb.
  1. The checksum variant appropriate for the witness version.
  1. The decoded witness version and witness program length.
  1. Whether the wallet or transaction builder actually supports sending to that output type.

For witness version 0, the program must be 20 or 32 bytes. For Taproot witness version 1, the program is 32 bytes under BIP341.

Does a SegWit wallet automatically support Taproot?

No. Supporting version 0 addresses does not automatically mean that software understands version 1 addresses, Bech32m, Taproot key-path signing, or script-path spending. Receive and send capabilities must be tested independently.

Primary references

  • BIP173 — Bech32: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
  • BIP350 — Bech32m: https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki
  • BIP341 — Taproot: https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects