Binary-to-text encoding compared: Base64, Base32, Base58, and more
Binary-to-text encodings convert arbitrary bytes into printable characters so they can travel through text-only channels: JSON, XML, email, URLs, and printed QR codes. The main families are Base64 (MIME, data URIs), Base32 (OTP secrets, product keys), Base58 (Bitcoin addresses, IPFS CIDs), and Base85 (PostScript, PDF). Each trades overhead for specific usability properties.
How this is calculated
Base64 is the workhorse: 33% overhead, no ambiguous characters, supported everywhere. Base32 adds more overhead (60%) but is case-insensitive and avoids visually confusable characters (0/O, 1/I/l), making it ideal for human-typed values like 2FA recovery codes. Base58 omits characters that look similar in many fonts (0, O, I, l) and is used by Bitcoin and IPFS because addresses need to be copyable without ambiguity. Base85 (Ascii85) has only 25% overhead but uses characters that break in many contexts (quotes, backslashes). For most modern use cases, Base64 is the right default.
Verdict
Default to Base64 for binary-in-text. Use Base32 when humans will type or read the encoded value. Use Base58 for blockchain addresses and content identifiers. Avoid Base85 unless you're working with PDF or PostScript internals.
