Bech32 is the address format introduced in BIP-0173 for SegWit Bitcoin addresses and reused by Lightning Network invoices. It pairs a short human-readable prefix with the data and a strong checksum so typos are caught before any funds move. This tool encodes a human-readable part plus your data into a Bech32 string and decodes Bech32 back, verifying the checksum as it goes.
How it works
A Bech32 string has three parts: a human-readable part (HRP), the separator 1, and the data section. The data is encoded with a 32-character alphabet that drops the ambiguous characters 1, b, i and o. Before encoding, this tool converts your bytes from 8-bit groups into 5-bit groups so they fit the alphabet, then appends a 6-symbol checksum.
That checksum is a 30-bit BCH code. The encoder expands the HRP, concatenates the data, runs a polymod function over five generator constants, and emits the result so that decoding the full string yields the constant 1. On decode, the same polymod must produce 1 or the string is rejected. This is what makes Bech32 robust: it can locate up to four character errors instead of silently accepting a corrupted address.
Tips and notes
Real Bitcoin addresses prepend a witness version before the program bytes, and Lightning invoices pack a timestamp, tagged fields and a signature into the data section. This tool exposes the raw HRP plus data mechanics so you can learn the format, prototype your own checksummed identifiers, or verify why a given address is being rejected. Keep the HRP lowercase: Bech32 forbids mixing upper and lower case in one string.