Skip to content
100% local

Bech32 converter

Encode a prefix and data into Bech32 or Bech32m, or decode and verify one.

Input

Bech32 converter

Bech32 and its variant Bech32m are the checksummed text encodings behind modern SegWit Bitcoin addresses, Lightning invoices' building blocks, and Nostr keys such as npub and nsec. This tool builds a Bech32 or Bech32m string from a human-readable prefix and a data payload, or takes an existing string apart to show you the prefix, the data as hex, and whether the checksum actually holds up.

Switch Direction to choose encode or decode. Encoding reads the data from the input box — as hex byte pairs, or, if you flip Data input format to base32, as characters straight from the Bech32 charset (qpzry9x8gf2tvdw0s3jn54khce6mua7l) — combines it with the Human-readable prefix, and appends a 6-character checksum computed for whichever Variant you picked. Decoding does the reverse: it splits the string on its last "1", verifies the checksum against the selected variant, and prints the prefix followed by the data in hex. If the checksum doesn't match your chosen variant but does match the other one, the error tells you so, since Bech32 and Bech32m differ only in one constant used to compute the checksum.

Check length against the 90-character Bech32 limit enforces the bounds BIP-173 sets for both the prefix (83 characters) and the whole string (90 characters); turn it off to work with longer strings, such as the base32 payloads some non-address use cases produce. Show checksum separately prints the 6-character checksum on its own line instead of folding it into the main string. Note that this is a general-purpose Bech32 tool, not a Bitcoin-specific one: a SegWit address encodes an extra witness-version symbol ahead of its data, so decoding a real address here will very often report a padding mismatch — that is expected, since the raw bitstream doesn't line up on a byte boundary once that extra symbol is included.

Everything runs locally in your browser; nothing you paste is ever uploaded. Copy the result, download it as a .txt file, or send the output straight back into the input to keep working on it.

FAQ

What's the difference between Bech32 and Bech32m?
They share the same structure and alphabet but use a different constant when computing the checksum. Bech32 is the original (used by version-0 SegWit addresses); Bech32m fixes a weakness the original had for other witness versions and is used by newer formats like Taproot addresses.
Why does decoding a real Bitcoin address sometimes fail here?
A SegWit address packs a witness-version symbol in front of the actual data before the checksum. This tool treats everything between the prefix and the checksum as one plain data stream, so it won't split that version symbol out — decoding still verifies the checksum correctly, but the reported hex covers the whole stream rather than just the program.
What happens if I paste data in the wrong format?
You'll get a calm error explaining what's wrong — such as an odd number of hex digits, or a character outside the Bech32 charset — rather than a silent wrong answer.
Can I use a prefix other than "bc"?
Yes. The human-readable prefix is any string of printable ASCII characters — "bc" for Bitcoin mainnet, "tb" for testnet, "npub"/"nsec" for Nostr keys, or any prefix you choose.
Is my data uploaded anywhere?
No. Encoding and decoding both run entirely in your browser — nothing you type or paste is ever sent to a server.