Base64 Encoding Explained: How It Works, Where It Is Used and Common Myths
Email attachments, image data URIs and JWT tokens all rely on Base64. This guide explains exactly what Base64 does, why the output is longer than the input, and when you should and should not use it.
All computer data is ultimately bytes. Yet many channels can only carry text safely: email bodies, HTTP headers, JSON documents and URLs. If you push raw image bytes or ciphertext through those channels, control characters and line breaks can corrupt the data, or an intermediate system may rewrite it.
Man → TWFu
Hi → SGk=
한 → 7ZWc
안녕 → 7JWI64WV
Learn how Base64 turns 3 bytes into 4 characters, what the trailing = means, how Base64URL differs, and why Base64 is not encryption.Read guide →