Encode text to Base58 format (Bitcoin alphabet)
Encode text to Base58 format instantly with our free online Base58 encoder tool. This encoder helps cryptocurrency developers and blockchain professionals convert data into Base58 encoding using the Bitcoin alphabet for addresses and keys. Simply paste your text and get the Base58-encoded output in real-time.
Base58 encoding represents binary data using 58 alphanumeric characters, excluding easily confused characters (0, O, I, l). Created for Bitcoin addresses, it's ideal for user-facing identifiers that need to be typed accurately without visual ambiguity.
Base58 treats input bytes as a big integer, then repeatedly divides by 58, mapping remainders to characters. Unlike Base64/32, it's not bit-aligned but produces shorter, unambiguous output. Leading zeros become '1' characters.
Base58 alphabet: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz (excludes 0, O, I, l). No padding needed. ~37% space overhead. Variants: Base58Check adds 4-byte checksum for error detection.
Bitcoin, Litecoin, and many cryptocurrencies use Base58Check.
1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2URL shorteners use Base58 for compact, unambiguous IDs.
IPFS CIDv0 uses Base58btc encoding.
Any identifier users might type manually.
const BASE58_CHARS = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
function base58Encode(bytes) {
// Handle leading zeros
let zeros = 0;
for (const b of bytes) {
if (b === 0) zeros++;
else break;
}
// Convert bytes to big integer
let num = BigInt(0);
for (const byte of bytes) {
num = num * 256n + BigInt(byte);
}
// Convert to base58
let result = '';
while (num > 0n) {
result = BASE58_CHARS[Number(num % 58n)] + result;
num = num / 58n;
}
// Add leading '1's for leading zeros
return '1'.repeat(zeros) + result;
}
// Example: encode "Hello"
const bytes = new TextEncoder().encode('Hello');
base58Encode(bytes); // "9Ajdvzr"Treat input as big integer, convert to base 58, preserve leading zeros as "1"s.
Use Base58 for cryptocurrency addresses, short URLs, and any user-facing identifier where visual clarity matters. Add checksum for critical data that users type.
Base64 includes +, /, = which cause URL encoding issues and visual confusion. Base58 is URL-safe by default and excludes 0/O/I/l which look similar in many fonts. Trade-off: Base58 is larger (37% vs 33% overhead).