Base58 Encode and Decode (Bitcoin Alphabet) – Free

Base58 encode a piece of text, or decode a Base58 string such as an address or key into its raw bytes. This tool uses the Bitcoin alphabet and does all the math in your browser.

How to use the Base58 encode / decode tool

  1. Set Operation to Encode for text to Base58, or Decode for Base58 to bytes.
  2. Paste your input into Text or encoded value. Encoding accepts up to 8 KiB of UTF-8 text and decoding up to 12,000 characters.
  3. Select Convert. Select Example first to see Hello, world! encoded as 72k1xXWG59wUsYv7h2.
  4. Read the Result box: Base58 text after encoding, or the decoded text or hex dump after decoding.
  5. Select Copy, or after decoding select Download to save the bytes as decoded.bin.

How Base58 encoding works

Base58 does not slice bits into fixed groups the way Base64 does. It treats the whole input as one large number, with the first byte as the most significant, and rewrites that number in base 58 by repeated division. The digits come from an alphabet of 58 characters: 1 to 9, uppercase letters without I and O, and lowercase letters without l.

A number has no leading zeros, so zero bytes at the start of the input would be lost. Base58 keeps them by writing one 1, the symbol for zero, for each leading zero byte. Decoding reverses both parts: it rebuilds the number, turns it into bytes and puts one zero byte in front for every leading 1.

A small Base58 example

The text Hi is the bytes 48 69 in hex, which is the number 18,537. That equals 5 × 58 × 58 + 29 × 58 + 35. Position 5 in the alphabet is 6, position 29 is W and position 35 is c, so the result is 6Wc.

Because the whole number is converted at once, changing one input byte can change every output character. On average Base58 needs about 1.37 characters per byte. The last sample decodes a well-known Bitcoin address to its 25 raw bytes.

Hi             →  6Wc
Hello, world!  →  72k1xXWG59wUsYv7h2

1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
→  25 bytes
   Hex: 00 62 e9 07 b1 5c bf 27 d5 42 53 99 eb f6 f0 fb 50 eb b8 8f 18 c2 9b 7d 93

Limits and what the tool does not check

Big-number arithmetic gets slow on long inputs, so encoding is capped at 8 KiB of text and decoding at 12,000 characters. Base58 is meant for short values such as hashes, keys and identifiers.

  • Decoding trims spaces and line breaks at both ends. Whitespace inside the string counts as an invalid character.
  • The characters 0, O, I and l never appear in Bitcoin Base58. Finding one means the value was mistyped or uses another alphabet.
  • Base58Check checksums are not verified. A decoded address still contains its version byte and four checksum bytes.
  • Encoding always starts from UTF-8 text. The page has no hex or file input for encoding raw binary such as a key hash.

Where developers meet Base58

Base58 was introduced with Bitcoin for addresses and for private keys in wallet import format. The goal was a value without look-alike characters or punctuation that is easy to copy by hand. The same alphabet is used for Solana account addresses and for IPFS content identifiers that start with Qm.

When you decode a legacy Bitcoin address, the 25 bytes are a version byte, a 20-byte public key hash and a 4-byte checksum taken from a double SHA-256 of the first 21 bytes.

Frequently asked questions

Why does Base58 leave out 0, O, I and l?

Those four characters are easy to confuse in many fonts: zero with capital O, and capital I with lowercase l. Removing them, along with the plus and slash of Base64, leaves 58 symbols that are safe to read, type and double-click.

Does this tool validate a Bitcoin address checksum?

No. It performs plain Base58 decoding and shows every byte, including the four checksum bytes. To validate an address, hash the first 21 bytes twice with SHA-256 and compare the first four bytes of the result.

Why does my decoded Base58 show hex instead of text?

Most Base58 values are hashes or keys, which are binary. When the bytes are not valid UTF-8 the tool prints the byte count and a hex dump. Download gives you the same bytes as a file.

Can I paste a private key here safely?

The conversion runs in your browser and the page does not transmit the value. Even so, treat any real private key with care and prefer an offline machine for keys that control funds.

Related tools