Base58 Encoder and Decoder

Convert text or hex bytes to Base58 and back. Add the four byte checksum used for addresses with Base58Check, or switch alphabet.

Direction

Worked examples

Text

Hello World!

2NEpo7TZRRrLZSi2U

A well known test value.

Base58Check

21 zero bytes

1111111111111111111114oLvT2

This is the all zero address, with its checksum.

About Base58 Encoder and Decoder

Base58 is a way to write binary data using 58 letters and digits, leaving out the characters that are easy to mix up: zero, capital O, capital I and lower case l. Unlike Base64 it has no symbols, so a value can be selected with a double click and is easier to read aloud or copy by hand. It is used for cryptocurrency addresses, keys and some short identifiers.

The encoder treats the input as one large number and writes it in base 58, with each leading zero byte written as the first character of the alphabet so that no data is lost. Base58Check adds a four byte checksum, taken from a double SHA-256 hash, before encoding. Decoding checks it and tells you when a character has been mistyped. An invalid character is reported with its position, and you can choose the Bitcoin, Flickr or Ripple alphabet.

How to use Base58 Encoder and Decoder

  1. Choose Encode or Decode and the alphabet.
  2. Paste text or hex bytes to encode, or a Base58 value to decode.
  3. Tick Base58Check if the value carries a checksum.
  4. Copy the result.

Common uses

  • Reading the payload of a cryptocurrency address
  • Making short copy-friendly identifiers from bytes
  • Checking whether a value has a valid checksum
  • Converting between hex and Base58 in scripts

Frequently asked questions

Why does Base58 leave out some characters?

The characters 0, O, I and l look alike in many fonts. Removing them cuts down on transcription mistakes.

What is Base58Check?

The data is followed by the first four bytes of its double SHA-256 hash before encoding. A single wrong character will almost always fail the check.

How are leading zero bytes treated?

Each leading zero byte becomes one leading 1 in the Bitcoin alphabet, which is how the original length is kept.

Which alphabet should I use?

Bitcoin is the usual one. Flickr swaps the order of upper and lower case, and Ripple uses its own order. Both sides must use the same alphabet.

Is it a form of encryption?

No. Base58 is only a way of writing bytes as text, and anyone can decode it.