Skip to content

Encoders & Crypto

Base58 & Bech32 Encoder

Crypto-address encoding — Bitcoin, Cardano, segwit and more.

Runs in your browser
Encoded
16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM

Base58 is used by Bitcoin legacy addresses. Bech32 backs segwit (bc1…) and Cardano addresses. HRP `bc` is Bitcoin mainnet, `tb` is testnet.

Understanding Base58 & Bech32

Crypto's address encodings — readable, checksummed, error-aware.

Why Bitcoin couldn't just use hex, the four characters Base58 drops, and why Bech32 catches typos that Base58 misses.

Base58 — Bitcoin's choice.

Satoshi picked Base58 for Bitcoin addresses because: 64 wasn't human-typeable (the + and / collide with URL syntax), 62 still included 0/O and 1/I/l ambiguity, and 58 is what you get when you drop those four confusable characters. The alphabet:123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz — note the missing 0, O, I, l. The encoded address can be read aloud over the phone without ambiguity.

Base58Check — adding the checksum.

Raw Base58 is just a base-58 representation of a big integer. Bitcoin addresses use Base58Check: append a 4-byte SHA-256(SHA-256(data)) checksum, then base58-encode the whole thing. The checksum catches almost all single-character typos. If you mistype one character in a 34-character address, the decoded checksum doesn't match and the wallet refuses to send. Without that step, a typo could send funds to a random impossible address — irrecoverably.

Bech32 — BIP173.

The successor: Pieter Wuille's 2017 design for SegWit addresses. Lowercase alphabet, all-lowercase or all-uppercase but never mixed (wallets normalise), no confusable characters, six-character BCH (Bose-Chaudhuri-Hocquenghem) error-correcting code at the end. Guarantees detection of up to four character substitutions in any 90-character address. A Bech32 address starts with a human-readable part — bc1 for mainnet Bitcoin, tb1 for testnet, ln for Lightning invoice.

A worked address.

Bitcoin legacy address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa — 34 chars, Base58Check, starts with 1. SegWit P2WPKH: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 — 42 chars, Bech32, starts with bc1. Lightning invoice: lnbc1pvjluezpp5q... — variable length, bech32-encoded amount + payment hash + routing hints. The bech32 version is longer but error-correcting; the small fee in length buys a lot in safety.

Legacy vs SegWit

Base58 vs Bech32

Same 20-byte hash, two encodings.

1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa (34) vs bc1qw508... (42)

= Bech32 catches more typos

Bech32m — the v1+ fix.

Bech32 has a tiny mutation bug: an extra p at the end can sometimes decode to a valid address. Harmless for SegWit v0, but for v1 (Taproot) and later it becomes risky. BIP-350 introduced Bech32m, a modified constant that fixes the bug. P2TR (Taproot) addresses start with bc1p and use Bech32m; P2WPKH/P2WSH (SegWit v0) start with bc1q and use Bech32. Wallets need to use the right one or addresses won't decode.

Beyond Bitcoin.

Ethereum uses hex with EIP-55 mixed-case checksum (case-sensitive validation, but works in case-insensitive contexts). Solana uses Base58 without checksum. Stellar uses StrKey, a custom base32 variant. Tezos uses Base58Check with type prefixes. Each chain made the trade-off differently; the design space — readable, typeable, checksummed — is what matters more than the specific format.

Frequently asked questions

Quick answers.

What is the difference between Base58 and Bech32?

Base58 is commonly used for legacy Bitcoin addresses. Bech32 is the SegWit address format which is case-insensitive, more compact, and includes superior error-detection capabilities.

Which cryptocurrencies use these encodings?

Bitcoin uses both for legacy and SegWit addresses. Cardano, XRP, and Solana utilise variations of Base58, while many Cosmos-based chains use Bech32.

Are my addresses or private keys secure?

Yes. This tool runs entirely client-side using JavaScript. No data is transmitted to a server, ensuring your inputs remain private and on your device.

What happens if a Bech32 address has a typo?

Bech32 uses a BCH checksum. This tool will fail to decode the string and alert you if the checksum does not match, indicating the data has been corrupted or mistyped.

People also search for

Related tools

More in this room.

See all in Encoders & Crypto