Base32 & Base58 Encoder
Encode or decode text and hexadecimal strings using Base32 (RFC 4648) and Base58 (Bitcoin) offline. Private and secure.
Base58 Encoding Architecture & The Bitcoin Alphabet
Base58 is a binary-to-text encoding scheme created by Satoshi Nakamoto for the Bitcoin protocol (and subsequently adopted across major blockchain ecosystems including Solana, IPFS, and Monero). While Base64 is efficient for machine data interchange, its alphabet contains characters that create severe human usability and transcription problems.
To eliminate human ambiguity in handwritten and visually transcribed cryptocurrency addresses, Base58 removes four visually confusing characters from the standard 62-character alphanumeric set:
- 0 (Zero) and O (Uppercase o): Visually indistinguishable in many monospaced and sans-serif fonts.
- I (Uppercase i) and l (Lowercase L): Visually identical in most standard typography.
- Non-alphanumeric symbols (+ and /): Removed to ensure addresses double-click select cleanly as a single word in line wraps and URL parameters.
The resulting 58-character alphabet (123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz) is computed via big-integer modulo arithmetic, preserving leading zero bytes as leading 1 characters.
Programmatic Base58 Implementation in JavaScript & Python
// Node.js Base58 using bs58 library
import bs58 from 'bs58';
const bytes = new TextEncoder().encode("Hello, Web3!");
const encoded = bs58.encode(bytes);
console.log("Base58:", encoded);
const decodedBytes = bs58.decode(encoded);
console.log("Decoded:", new TextDecoder().decode(decodedBytes));
# Python 3 using base58 library
import base58
data = b"Hello, Web3!"
encoded = base58.b58encode(data).decode("ascii")
print("Base58:", encoded)
original = base58.b58decode(encoded.encode("ascii"))
print("Original:", original.decode("utf-8"))
Base58 vs Base58Check (Checksum Verification)
In cryptocurrency wallets, raw Base58 is commonly extended into Base58Check. Base58Check appends a 4-byte double-SHA256 checksum (SHA256(SHA256(payload))[0:4]) to the data before encoding. If a user mistypes a single character when entering a wallet address, the checksum verification fails, preventing irreversible fund transfers to invalid destinations.
Also Supporting Base32 & Base85 Formats
Our converter also supports Base32 (RFC 4648)—which uses 32 uppercase characters for case-insensitive spoken readouts and two-factor authentication (TOTP QR codes)—and Base85 / Ascii85, which provides higher compression efficiency (7% overhead vs Base64's 33%) for PostScript and Git binary patches.
Base58 vs Base64: Ambiguity Elimination & Bitcoin Checksum Hashing
Standard Base64 encoding utilizes characters that create severe optical ambiguity when transcribed manually or printed in high-density physical formats. Specifically, the digits 0 (zero) and capital O (capital o), capital I (capital eye) and lowercase l (lowercase el), as well as non-alphanumeric punctuation (+ and /) frequently lead to human transcription errors.
Satoshi Nakamoto designed Base58 specifically to eliminate these ambiguous glyphs while omitting punctuation symbols that trigger unwanted line-wrapping or URL query splitting. In blockchain protocols, Base58Check wraps payloads with a 4-byte double SHA-256 checksum (SHA256(SHA256(payload))[0..3]), ensuring that a single mistyped character immediately invalidates the entire address before transactions are broadcast.
Base58 Alphabet Variants
- Bitcoin Alphabet:
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. - IPFS / Ripple Alphabet: Re-orders lowercase letters prior to uppercase characters to optimize binary trie routing.
- Leading Zero Handling: Every leading zero byte in the input payload is preserved as a prepended
1character in the output string.
Cryptographic Checksums & IPFS Content Identifiers (CID)
Beyond Bitcoin addresses, Base58 is heavily utilized across modern decentralized web protocols, notably InterPlanetary File System (IPFS) and Filecoin. IPFS Content Identifiers (CIDv0) use Base58 multihash strings (starting with Qm) to cryptographically identify content blocks. Because Base58 avoids ambiguous punctuation, developers can safely copy-paste, print, and transcribe CIDs across physical and digital media without risk of transcription failure.
Solana Public Key Encoding: High-performance Layer-1 blockchain Solana utilizes raw 32-byte Ed25519 public keys formatted natively as Base58 strings, making Base58 encoding fundamental for Web3 wallet address validation and decentralized application RPC payloads.
Frequently Asked Questions
Numeral 0 is intentionally excluded from the Base58 alphabet to prevent visual confusion with uppercase letter O.
Yes. Base58 differentiates strictly between uppercase and lowercase letters.
Base58 is widely used in Solana public wallet keys, IPFS content identifiers (CIDs), Flickr short URLs, and distributed peer-to-peer storage protocols.
In the Base58 encoding algorithm, every leading 0x00 byte in the input data is directly mapped to a leading "1" character in the output string.
No. All BigInt calculations and encoding routines run 100% in your browser memory.