Skip to tool

Bech32 and Bech32m Encoder and Decoder

Encode bytes with a human-readable prefix and Bech32 or Bech32m checksum, or validate and decode an existing string.

Runs in your browser — your input is processed on this device and never uploaded.

Input

Enter text or upload a file to encode. To decode, enter the encoded text.

Used when encoding. Decoding detects and validates the supplied string.

Short tag before the 1, such as bc or addr. Encoding only.

Result

Results appear here.

About this tool

On this page

What are Bech32 and Bech32m?

Bech32 is a checksummed string format: a human-readable prefix, the separator 1, data in a 32-character alphabet, and a six-character checksum. BIP-173 defined it for Bitcoin SegWit addresses, and BIP-350 added Bech32m, which changes one checksum constant to fix a flaw.

Bech32 options

Operation
Encode (the default) or Decode.
Data
Text or a file to encode, or a complete Bech32 string to decode.
Checksum
Bech32 (the default) or Bech32m, used when encoding. Decoding detects which one the string uses and validates it.
Human-readable prefix
The tag before the 1, such as bc or addr. Default bc. Encoding only.
  • Decoding returns the prefix and the original bytes.
  • This is the generic codec. It does not add a SegWit witness version byte, and it does not check whether a string is a valid address for a given network.

Why Bech32 is built for people

The data alphabet, qpzry9x8gf2tvdw0s3jn54khce6mua7l, leaves out 1, b, i and o, and a string is either all lowercase or all uppercase, never mixed. That makes it easier to read aloud, and an uppercase string fits the compact alphanumeric mode of a QR code.

The checksum is a BCH code that is guaranteed to detect any error affecting up to four characters, where a hash-based checksum only makes such misses unlikely.

Bech32 alternatives

Base58 and Base58Check is the older Bitcoin address format and still common for legacy addresses. Base32 is the RFC 4648 encoding, with a different alphabet and no checksum.

Things to know about Bech32

Bech32m exists because the original checksum has a weakness: when a string ends in p, inserting or deleting q characters just before it can go unnoticed. BIP-350 fixed that with a different constant. SegWit version 0 addresses (bc1q…) keep Bech32, and version 1 and later, starting with Taproot (bc1p…), use Bech32m.

Warning

A valid checksum detects transcription errors. It does not authenticate the data, and it does not prove an address belongs to the network or address type you expect.

Browse

Find similar tools by category or tag.