Base58 & Base58Check Encode / Decode

Convert text or hex bytes to Base58 and back, with the Bitcoin, Ripple or Flickr alphabet. Switch on Base58Check to append or verify the 4-byte checksum used by Bitcoin addresses and WIF keys.

Loading tool…

About the Base58 Encode/Decode

Base58 writes binary data with 58 characters: the digits and letters without 0, O, I and l, which look alike, and without + and /, so that a double click selects the whole value. Unlike Base64 it does not work on groups of bits: the bytes are read as one big number that is written in base 58, and every leading zero byte becomes the first character of the alphabet (1 for Bitcoin). Hello World! encodes to 2NEpo7TZRRrLZSi2U.

The three alphabets hold the same characters in a different order, so a value must be decoded with the alphabet that encoded it. Bitcoin (123…ABC…abc…) is also used by IPFS CIDv0, Solana and most other projects. Ripple starts with r, which is why XRP Ledger addresses do. Flickr puts the lower-case letters before the upper-case ones, for its short photo URLs.

Base58Check protects a value against typing errors: the first 4 bytes of SHA-256(SHA-256(data)) are appended before encoding. The data starts with a version byte that tells what it is — 0x00 for a Bitcoin P2PKH address, 0x05 for P2SH, 0x80 for a WIF private key. When decoding, the tool recomputes the checksum with the Web Crypto API and shows the version byte and the payload in hexadecimal. Never paste a private key that holds real funds into an online tool.

How to use it

  1. Choose Encode or Decode, and the alphabet.
  2. Set “Data is” to UTF-8 text or Hex bytes.
  3. Tick Base58Check to append (encode) or verify and strip (decode) the checksum.
  4. Read the version byte and the payload in the Details box, and copy the result.

Frequently asked questions

Why is there no fixed ratio between input and output length?
Base58 converts one big number, not groups of bits: the output is about 1.37 characters per byte, but the exact length depends on the value. Leading zero bytes always give exactly one character each.
The checksum does not match. What does that mean?
One or more characters were mistyped or lost, the value was encoded with another alphabet, or it is not Base58Check at all (a Solana address or an IPFS hash has no checksum). Untick Base58Check to decode it as plain Base58.
Can I decode a Bitcoin address starting with bc1?
No. Addresses starting with bc1 are SegWit addresses in Bech32 or Bech32m, a different encoding. Base58Check addresses start with 1 or 3.
Why does my decoded text look like hex?
The decoded bytes are not valid UTF-8, which is normal for hashes and keys, so they are shown in hexadecimal. Set “Data is” to Hex bytes to always get hex.

Related tools