Base58 Encoder and Decoder
Input
Base58 is a binary-to-text encoding designed to avoid several easily confused characters. The Bitcoin alphabet omits 0 O I l as well as + /; other systems arrange the same 58 symbols differently. Legacy Bitcoin Base58Check addresses and IPFS CIDv0 strings are familiar examples. This browser-only tool converts UTF-8 text or exact hexadecimal bytes with the Bitcoin, Ripple or Flickr alphabet, and it rejects characters outside the selected alphabet.
How to encode and decode Base58
-
1
Enter bytes or a Base58 string
Encode direction accepts hex or raw text; decode direction accepts Base58.
-
2
Pick the alphabet if needed
Default is Bitcoin's Base58; Ripple and Flickr variants available for compatibility.
-
3
Run the conversion
Base58 does not chunk into neat 5 or 6-bit groups; it is treated as a single big-endian integer, divided by 58 repeatedly.
-
4
Copy the result
Encoded strings preserve leading zero bytes as leading `1` characters (the zero glyph in Bitcoin's alphabet).
The Bitcoin Base58 alphabet
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
Notice what is missing: 0, O, I, l. The first character in the alphabet is 1, which represents the integer 0.
How it actually works
Unlike Base64 which chunks bits in fixed groups, Base58 treats the whole byte string as a single big-endian integer N and expresses it in base 58:
result = []
while N > 0:
result.prepend(alphabet[N mod 58])
N = N / 58
for each leading zero byte in input:
result.prepend(alphabet[0]) # i.e. '1'
This is why Base58 encoding is non-trivial to stream, you need the whole number before you can emit any character.
Base58 vs Base58Check
A typical legacy P2PKH Base58Check payload is 25 bytes: 1 version byte, 20 hash bytes and 4 checksum bytes. The checksum is the first 4 bytes of the double-SHA-256 digest of the version and hash. Encoding that complete payload as Base58 produces the familiar address string.
This tool converts plain Base58 only. Use a dedicated Base58Check validator when you need to verify an address version and checksum.
Alphabet variants
| Variant | Where it’s used | Differences vs Bitcoin |
|---|---|---|
| Bitcoin | BTC addresses, IPFS CIDv0 | Baseline |
| Ripple | XRP addresses | Swapped positions |
| Flickr | Short photo URLs | Lowercase before uppercase |
Why not just use Base64?
Base64 uses 4 encoded characters for each 3 input bytes before padding, a fixed and efficient expansion. Base58 has slightly variable overhead but avoids several ambiguous characters, which helps when someone copies an identifier by hand or reads it aloud.
Frequently Asked Questions
Not universally. Base58 is better when humans handle the string; Base64 is better when machines shuttle it around. Base64 encodes 6 bits per character vs Base58’s ~5.86, so Base64 is slightly more compact.
Base58 encodes a big integer, so the length varies by a character or two depending on the high-order bits. Typical P2PKH addresses are 34 characters but 33 is possible.
It can decode the string to raw bytes; choose hexadecimal output so arbitrary bytes remain visible. It does not verify the version or checksum, so a decoded result is not proof that the address is valid. Use a Base58Check validator for that.
Yes. Each zero byte at the start of the input becomes a 1 character in the output, which is how Bitcoin addresses starting with 1 work.
Related Tools
AES Encrypt / Decrypt
Encrypt and decrypt low-risk text with AES OpenSSL ciphers. The passphrase is hashed with SHA-256 and the Base64 output is IV plus ciphertext.
A1Z26 Cipher Encoder
Encode text using the A1Z26 cipher (A=1, B=2, ... Z=26) or decode a number sequence back to letters, with customizable separator.
Base32 Encoder and Decoder
Encode and decode Base32 strings using the RFC 4648 alphabet. Useful for TOTP secrets, case-insensitive tokens and human-typed identifiers.
bcrypt Hash Generator
Generate bcrypt hashes or verify a plaintext password against an existing bcrypt hash. Side-by-side generate and verify in one tool.
Base85 Encoder and Decoder
Encode and decode Base85 in Adobe Ascii85 (PostScript/PDF) or Z85 (ZeroMQ) variants. More compact than Base64 for binary data.
Atbash Cipher Encoder
Encode or decode text with the Atbash cipher, a Hebrew substitution that maps A-Z to Z-A. Same operation encrypts and decrypts.