Toolstia / Base58 encoder and decoder

Base58 encoder and decoder

Base58 is the compact encoding used for Bitcoin addresses and many short identifiers. It is like Base64 but leaves out the characters that are easy to mix up: 0, O, I, l, and the symbols + and /. Paste text or hex bytes to encode them, or paste a Base58 string to decode it.

Uses the Bitcoin alphabet, which leaves out 0, O, I and l. Each leading zero byte becomes a leading 1.

How it works

  1. Choose encode or decode.
  2. For encoding, say whether the input is text or hex bytes, then paste it.
  3. Copy the result. Decoded bytes that are not readable text are shown as hex.

The alphabet

The tool uses the Bitcoin alphabet: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. It has 58 characters, so each character carries a little under 6 bits.

Leading zeros

Each leading zero byte becomes a leading 1 in the output, and each leading 1 decodes to a zero byte. That keeps the length information that plain number conversion would lose.

No checksum

This tool does the plain Base58 encoding only. Bitcoin addresses add a version byte and a 4 byte checksum first (Base58Check), which is not added here.

Size limit

Encoding is limited to 4,000 bytes because the algorithm slows down on long input.

Questions

Is Base58 encryption?

No. It is only a way to write bytes with letters and digits. Anyone can decode it. Everything happens in your browser, and nothing you enter is sent anywhere.

Why is it different from Base64?

Base64 uses 64 characters including look-alikes and symbols. Base58 trades some density for strings that are easier to read aloud and copy by hand.

Why did my decode show hex?

The decoded bytes were not valid text, so the tool shows them as hex instead of garbled characters.