Decode Base58 encoded text (Bitcoin alphabet)
Decode Base58 encoded strings instantly with our free online Base58 decoder tool. This decoder helps cryptocurrency developers and blockchain professionals convert Base58-encoded data back into readable text using the Bitcoin alphabet. Simply paste your Base58 string and get the decoded output in real-time.
Base58 decoder converts Base58-encoded strings back to original bytes. Essential for processing cryptocurrency addresses, IPFS hashes, and other Base58-encoded identifiers. Must handle leading '1' characters and optional checksums.
Each character maps to a value 0-57. Decoder treats the string as a base-58 number, converts to a big integer, then to bytes. Leading '1' characters become leading zero bytes (important for address prefixes).
Reverse mapping from 58 characters to values. For Base58Check, verify last 4 bytes match double-SHA256 checksum of preceding bytes. Invalid characters or failed checksum should reject the input entirely.
Decode and validate cryptocurrency addresses.
Decode CIDv0 hashes to get content identifier.
Decode shortened URLs to original identifiers.
Decode wallet import format (WIF) private keys.
const BASE58_CHARS = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
function base58Decode(str) {
// Count leading '1's (represent leading zero bytes)
let zeros = 0;
for (const c of str) {
if (c === '1') zeros++;
else break;
}
// Convert from base58 to big integer
let num = BigInt(0);
for (const char of str) {
const val = BASE58_CHARS.indexOf(char);
if (val === -1) throw new Error('Invalid Base58 character');
num = num * 58n + BigInt(val);
}
// Convert to bytes
const bytes = [];
while (num > 0n) {
bytes.unshift(Number(num % 256n));
num = num / 256n;
}
// Add leading zeros
return new Uint8Array([...Array(zeros).fill(0), ...bytes]);
}
base58Decode('9Ajdvzr'); // Uint8Array [72, 101, 108, 108, 111] ("Hello")Count leading "1"s, convert base-58 to integer, extract bytes, prepend zeros.
Use Base58 decoder for cryptocurrency address validation, IPFS hash processing, and decoding any Base58-encoded identifier. Always validate checksums for financial data.
Decode Base58Check, verify 4-byte checksum matches double-SHA256 of payload. Check version byte for expected address type. Invalid checksum means typo or corruption.