DevToolsmith

Base58 Encode / Decode

Encode text or hex bytes to Base58 and decode Base58 back, using the Bitcoin alphabet shared by IPFS and Solana. Leading zero bytes are preserved as leading 1s, and binary results such as decoded addresses are shown as hex.

Runs 100% in your browser — nothing is uploaded

Updates automatically. Encode up to 100,000 bytes or decode up to 140,000 Base58 characters. Larger jobs can be cancelled.

Processing Base58…

Input
Tip: drop a file here12 chars · 12 bytes · 1 line
Output
0 chars · 0 bytes · 0 lines

Conversion runs in a cancellable background worker. Encode up to 100,000 bytes or decode up to 140,000 Base58 characters, with decoded data limited to 100,000 bytes. Use Base64 for larger files.

The Base58 alphabet

58 characters: the digits 1–9, then letters without the look-alikes 0, O, I and l.

123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

Base58 in code

Python
# pip install base58
import base58

base58.b58encode(b"Hello World!")         # b'2NEpo7TZRRrLZSi2U'
base58.b58decode("2NEpo7TZRRrLZSi2U")     # b'Hello World!'
base58.b58decode_check(address)           # verifies the 4-byte checksum
JavaScript (bs58)
import bs58 from 'bs58';

bs58.encode(new TextEncoder().encode('Hello World!')); // '2NEpo7TZRRrLZSi2U'
bs58.decode('2NEpo7TZRRrLZSi2U');                      // Uint8Array
Go
import "github.com/mr-tron/base58"

base58.Encode([]byte("Hello World!")) // 2NEpo7TZRRrLZSi2U
base58.Decode("2NEpo7TZRRrLZSi2U")

Working with other encodings? See Base64 and Base32. To hash data first, use the hash generator.

Frequently asked questions

Why does Base58 exist?

It was designed for Bitcoin addresses, to be easy for people to copy. Compared with Base64 it leaves out 0 (zero), O (capital o), I (capital i) and l (lowercase L), which look alike in many fonts, and + and /, so a double-click selects the whole string and it’s safe in URLs. It’s now also used by IPFS (CIDv0 hashes starting with Qm), Solana and Ripple.

Why do some Base58 strings start with 1?

“1” is the first character of the alphabet, so it stands for zero. Base58 treats the data as one big number, which would lose leading zero bytes, so each leading zero byte is written as an extra 1 at the start. That’s why Bitcoin addresses for the main network (version byte 0x00) begin with 1.

Does this check Base58Check checksums?

No, it decodes the plain Base58 layer. In a Base58Check value, such as a Bitcoin address or a WIF private key, the last 4 decoded bytes are a checksum: the first 4 bytes of a double SHA-256 of the rest. Decode the address here and you get the version byte, the payload and those 4 checksum bytes, shown as hex.

Is Base58 different in Ripple or Flickr?

Yes, they use the same idea with the characters in a different order, so a string from one doesn’t decode correctly with the other. This tool uses the Bitcoin alphabet, which is by far the most common, including in IPFS and Solana.