Base64, Hex, Base32 and ASCII85 Compared: Trade-offs in Size and Readability
Base64 is the most common way to encode binary data as text, but alternatives such as hexadecimal, Base32 and ASCII85 each exist to address specific constraints. Hex doubles data size but is easy for people to read, while Base32 adds about 60% overhead to avoid confusion from letter case and similar-looking characters. ASCII85 is the most space-efficient of the four at about 25% overhead and is used in PostScript and PDF files. Base64's dominance comes from carrying 6 bits per printable character, with its remaining issues handled by URL-safe variants. The article also warns that hex strings can be decoded as Base64 without error, producing incorrect bytes.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in