Bech32 converter
Encode a prefix and data into Bech32 or Bech32m, or decode and verify one.
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.