Skip to content
uencoder

Base58

Base58 is a human-oriented binary-to-text encoding using 58 characters (dropping the easily confused 0, O, I, l, +, and / from Base64), best known for cryptocurrency addresses.

Purpose

It avoids transcription errors from look-alike characters (0/O, I/l) and keeps the output double-click selectable (no characters that terminals would split).

Mechanism

The input byte stream is treated as a single large integer, repeatedly reduced modulo 58 to derive each character index (like a radix conversion); leading zero bytes map to leading 1s. Because the mapping is not bit-aligned, the encoded length is not fixed and decoding requires big-integer arithmetic.

Use cases

  • Bitcoin / Litecoin address encoding
  • IPFS CID multibase representation
  • Monero addresses
  • Short link and invitation code generation

Examples

  • Input
    Hello World
    Output
    JxF12TrwUP45BMd

    The Bitcoin Base58 alphabet

Common errors

Assuming Base58 works on 6-bit groups (it is actually big-integer modulo arithmetic)
Use a big-integer, byte-by-byte implementation or a mature library

Related terms

Related tools

References