1001Ferramentas
๐Ÿช™Validators

Base58 Validator

Validate Base58 (Bitcoin alphabet, no 0, O, I, l).

Base58 validation: the Bitcoin-flavored encoding

Base58 is a binary-to-text encoding designed by Satoshi Nakamoto for the Bitcoin codebase in 2009. Its goal was specifically to produce identifiers that are human-friendly when shared verbally or written by hand, so the alphabet is built by taking the 62 ASCII alphanumeric characters and removing the four that look like each other:

  • 0 (digit zero) โ€” confused with capital O
  • O (capital o) โ€” confused with digit zero
  • I (capital i) โ€” confused with lowercase l and digit 1
  • l (lowercase L) โ€” confused with capital I and digit 1

That leaves the canonical 58-character alphabet:

123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

A famous example is the Genesis Block address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa โ€” Satoshi's own wallet, still holding the first 50 BTC mined.

Base58Check: Base58 with a checksum

Plain Base58 has no error detection. The Bitcoin protocol therefore wraps it in Base58Check: a one-byte version prefix is prepended to the payload, SHA-256 is applied twice, and the first 4 bytes of that double hash are appended as a checksum before encoding. The result is the familiar Bitcoin address: any single-character typo changes the checksum and rejects the transaction at the wallet, well before it touches the network. The same scheme is used for private keys in Wallet Import Format (WIF) and for extended keys (xpub / xprv) in BIP-32.

Encoding mechanics and edge cases

Unlike Base64, Base58 is not 8-bit aligned: 58 is not a power of 2, so encoding is implemented as a BigInt division โ€” convert the entire byte string to one big integer, then repeatedly divide by 58 and emit the remainder. A consequence is that leading zero bytes in the source do not contribute to the integer and would be lost on round-trip; the spec preserves them by emitting one 1 character (the first letter of the alphabet) per leading zero byte. That is why every legacy Bitcoin address starts with 1 (version byte 0x00 for P2PKH) or 3 (version byte 0x05 for P2SH).

Beyond Bitcoin: Base58 in the wild

  • IPFS CIDv0 uses Base58 (the Bitcoin alphabet) for content identifiers โ€” they all start with Qm because the multihash prefix is 0x1220.
  • Stellar account addresses (the G... public keys) use a Base32 variant, not Base58 โ€” a common confusion.
  • NEO blockchain addresses and several private chains reuse Base58Check directly.
  • Solana public keys are 32-byte Ed25519 keys encoded in Base58 without checksum.

Bech32 (BIP-173, SegWit native addresses starting with bc1) is the modern replacement for Base58Check in Bitcoin: case-insensitive, lowercase-only, and uses a BCH error-correcting code instead of a double-SHA truncation.

FAQ

How is Base58 different from Base64? Base58 is case-sensitive, has no +, / or =, and skips visually ambiguous characters. It is URL-safe by construction and copy-paste-safe across fonts. The trade-off is performance: Base64 is a fast bit-shift; Base58 requires BigInt division.

Why is Base58 slower than Base64? Because 58 is not a power of two, encoding cannot be a fixed bit-window. The implementation is roughly O(nยฒ) in the input length using naive BigInt arithmetic, vs Base64's strict O(n).

Is Base58 used outside cryptocurrency? Rarely. URL shorteners typically pick Base62 (keeps all alphanumerics โ€” denser, simpler decoding), and modern Bitcoin addresses are migrating to Bech32. Base58 remains where backwards compatibility with the original Bitcoin tooling matters.

Popular libraries? bs58 and bs58check on npm, base58 in Python, bitcoin-core in C++, plus the generic base-x package that lets you instantiate any custom alphabet.

Related Tools