Base58 encode: readable, copy-safe output
Base58 was designed for identifiers that people read and copy. It uses 58 alphanumeric characters and deliberately leaves out 0 (zero), O (capital o), I (capital i) and l (lower-case L), which look alike in many fonts, as well as + and /, which break URLs and double-click selection. This tool will Base58 encode any text using the alphabet you choose.
How Base58 differs from Base64
Base64 works on fixed groups of bits. Base58 cannot, because 58 is not a power of two. Instead, the whole input is treated as one large number and repeatedly divided by 58, with each remainder selecting a character. Consequences:
- There is no padding, and the output length varies slightly with the data.
- Each leading zero byte is written as the first alphabet character (
1in the Bitcoin alphabet), so zeros are not lost. - Encoding is slower on large inputs, which is why Base58 is used for short values such as keys, hashes and addresses rather than files.
Example
Input: Hello World!
| Alphabet | Output |
|---|---|
| Bitcoin / IPFS | 2NEpo7TZRRrLZSi2U |
| Flickr | 2nePN7syqqRkyrH2t |
| Ripple | p4NFofTZRRiLZS5p7 |
The three alphabets
- Bitcoin / IPFS —
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. Used by Bitcoin addresses and private keys (WIF), IPFS CIDv0 hashes (Qm…), Solana addresses and many others. - Flickr — the same characters with lowercase letters before uppercase, used for Flickr short photo URLs.
- Ripple — a reordered alphabet starting with
r, which is why XRP Ledger addresses begin with “r”.
How long is Base58 output?
Each Base58 character carries about 5.86 bits, so encoded data is roughly 1.37 characters per byte — about the same as Base64 (1.33) and much shorter than hex (2.0). A 32-byte hash becomes 43 or 44 Base58 characters, compared with 64 in hex. That combination of compactness and readability is why so many blockchain and content-addressing systems adopted it.
Base58 vs Base58Check
Cryptocurrency addresses use Base58Check: a version byte is prepended and a 4-byte checksum (from a double SHA-256 hash) is appended before Base58 encoding, so typos are detected. This tool performs plain Base58 without the version byte or checksum. Never construct a wallet address by hand; use your wallet software.
Decode with Base58 Decode, or compare with Base32 and Base64. Encoding runs in your browser.
Base58 encoding in code
Most languages need a small library, because Base58 is not part of their standard library. With the Bitcoin alphabet, the five bytes of hello encode to Cn8eVZg:
# Python (pip install base58)
import base58
base58.b58encode(b"hello") # b'Cn8eVZg'
// JavaScript (npm install bs58)
import bs58 from 'bs58';
bs58.encode(new TextEncoder().encode('hello')); // 'Cn8eVZg'When results differ between tools, check three things: the alphabet (a Flickr or Ripple encoder gives different characters for the same bytes), the text encoding of the input (this tool uses UTF-8), and whether the other tool silently added a Base58Check checksum. Leading zero bytes are another quick test: the bytes 00 00 01 must encode as 112, two 1 characters for the zeros followed by the value.