Encode a hex payload to a Bech32 or Bech32m address, or decode one back to its parts. Handles P2WPKH, Taproot, Cosmos and any custom HRP. Runs in your browser.
Bech32 is the encoding behind every native SegWit Bitcoin address. When you see an address starting with bc1q, you are looking at a 20-byte or 32-byte witness program that has been grouped into five-bit chunks, mapped through a 32-character case-insensitive alphabet, and protected by a 6-word checksum that catches any single-character error with probability 1 minus 2-30. The human-readable part before the separator (bc for Bitcoin mainnet, tb for testnet, cosmos for Cosmos Hub) is also covered by the checksum, so a cross-chain paste fails loudly rather than silently.
BIP-350 introduced Bech32m in 2021 for Taproot addresses. The two schemes share the same alphabet and the same polymod, differing only in the constant XORed at the end: Bech32 uses 1, Bech32m uses 0x2bc830a3. Witness version 0 (P2WPKH, P2WSH) requires Bech32; witness versions 1 through 16 (Taproot) require Bech32m. This is the single most common bug in address validators: checking a Taproot address with the v0 constant produces a checksum failure that looks like a typo. This tool names that case explicitly.
The first Load Sample click fills the encode input with bc|751e76e8199196f38d7f5f3ccc9560b0c7b3e0b, the canonical 20-byte witness program from the BIP-173 specification itself. WithBech32 selected, the tool produces bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4, a 42-character P2WPKH address. The metadata strip reports 20 payload bytes, 42 total characters, and confirms the 6-word checksum was appended. Press Round trip and the address feeds the decoder, which recovers the same hex, confirms the HRP as bc, and marks the checksum as verified.
hrp|hexbytes, a pipe separating the human-readable part from the payload hex. The HRP may be 1 to 83 printable ASCII characters; the hex may carry an optional 0x prefix and whitespace. An odd digit count is refused with “Hex needs an even number of digits — this has N, so one nibble has no byte to sit in.”hrp|hex back to the encoder with the detected variant pre-selected, so you can verify the round trip is lossless.cosmos, 20-byte payload), showing that Bech32 is not Bitcoin-specific.bc, that limits the payload to roughly 51 bytes before the separator and checksum push the total over the line.bc1p Taproot address produces “Checksum looks valid as Bech32, not Bech32m. The witness version and checksum scheme do not match.” This is distinct from a mistype: the string is structurally valid, just built with the wrong constant.BC1QW5 and bc1qw5decode identically, but Bc1qW5 is refused with “Mixed upper and lower case characters.”Enter an HRP and hex data to produce a Bech32 address. Load Sample fills in a P2WPKH mainnet address.
Bech32 (BIP-173) uses constant 1 for witness version 0 (P2WPKH, P2WSH). Bech32m (BIP-350) uses constant 0x2bc830a3 for witness versions 1–16 (Taproot). Mixing them produces a checksum failure, not a typo. Everything is computed in this tab.