PureDevTools

Base58 Encoder / Decoder

Encode and decode Base58 with Bitcoin and Flickr alphabets for addresses and hashes

All processing happens in your browser. No data is sent to any server.

Alphabet

Bitcoin alphabet (default) — used in Bitcoin addresses, IPFS CIDv1

Input Format

Type or paste text above to see the Base58-encoded result. Base58 is commonly used in Bitcoin addresses and IPFS content identifiers.

You’re verifying a Bitcoin address and need to confirm that 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa is valid Base58Check. Or you’re working with IPFS and need to decode a CID that starts with Qm. Or you’re building a system that generates short, human-readable IDs and want to avoid the ambiguity of Base64’s 0/O and I/l characters. Base58 solves all of these.

What Is Base58?

Base58 is a binary-to-text encoding scheme that uses 58 alphanumeric characters, deliberately excluding characters that look similar in common fonts. It was designed by Satoshi Nakamoto for Bitcoin addresses and has since been adopted by other cryptocurrency and distributed systems.

The Bitcoin Base58 alphabet:

123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

Notice what’s missing: 0 (zero), O (uppercase o), I (uppercase i), and l (lowercase L). These four characters are excluded because they are easily confused in many typefaces, leading to transcription errors when users copy addresses by hand or read them aloud.

Base58 vs Base64

PropertyBase58Base64
Character set size5864
Ambiguous charactersNoneContains 0, O, I, l
Special charactersNoneUses +, /, =
URL-safeYes (no special chars)Needs URL-safe variant
Size efficiency~73% of Base64Better (33% overhead vs raw)
Primary useHuman-readable IDsData transport

Base58 is less space-efficient than Base64 — it produces longer output for the same input. But it prioritizes human readability and error resistance over compactness.

Base58Check (Bitcoin)

Bitcoin doesn’t use plain Base58 — it uses Base58Check, which adds a version byte prefix and a 4-byte checksum suffix before encoding:

1. Take the payload bytes
2. Prepend version byte (0x00 for mainnet address, 0x05 for P2SH)
3. Compute SHA-256(SHA-256(versioned_payload))
4. Append first 4 bytes of the double-SHA hash as checksum
5. Base58-encode the result

The checksum allows wallets to detect typos in addresses before attempting a transaction. If you change a single character in a Base58Check string, the checksum will almost certainly fail, preventing funds from being sent to a wrong address.

The version byte determines the leading character:

Base58 Alphabets

Two Base58 alphabets are in common use:

Bitcoin Alphabet

123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

Used by: Bitcoin, Litecoin, IPFS (CIDv0), Monero, and most cryptocurrency projects.

Flickr Alphabet

123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ

The Flickr alphabet swaps the case ordering — lowercase letters come before uppercase. It was used by Flickr for short URLs. The only difference from the Bitcoin alphabet is the relative ordering of upper and lowercase letters.

This tool supports both alphabets.

Where Base58 Is Used

Bitcoin and cryptocurrencies: Base58Check is the standard encoding for Bitcoin legacy addresses (P2PKH, P2SH), Wallet Import Format (WIF) private keys, and extended public/private keys (xpub/xprv in BIP-32). Newer SegWit addresses use Bech32 instead, but Base58 addresses remain widely supported.

IPFS: Content Identifiers (CIDs) in version 0 are Base58-encoded multihashes. A CIDv0 like QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG is a Base58-encoded SHA-256 hash with a multihash prefix. CIDv1 uses multibase encoding, which can include Base58btc (prefix z).

Distributed systems: Decentralized identity systems (DIDs), Stellar addresses, and various blockchain projects use Base58 for human-facing identifiers where typo resistance matters.

Short URLs and IDs: Base58 is a good choice for generating compact, unambiguous identifiers — shorter than hex, safer than Base64 for URLs, and resistant to visual confusion.

The Encoding Algorithm

Base58 encoding works differently from Base64. Base64 operates on fixed 6-bit groups; Base58 uses arbitrary-precision arithmetic (big integer division):

  1. Treat the input bytes as a big-endian unsigned integer
  2. Repeatedly divide by 58, collecting remainders
  3. Map each remainder to the corresponding Base58 character
  4. Reverse the result (since we collected least-significant digit first)
  5. For each leading zero byte in the input, prepend a 1 (the Base58 digit for zero)

Step 5 is critical: it preserves leading zero bytes, which is essential for Bitcoin addresses (the version byte 0x00 must survive encoding).

This means Base58 encoding is O(n^2) for large inputs — significantly slower than Base64’s O(n). For Bitcoin addresses (25 bytes), this is negligible. For large files, Base64 is the better choice.

Privacy

All encoding and decoding runs entirely in your browser. No data is sent to any server.

Related Tools

More Encoding & Crypto Tools