What is encoding (base64, quoted-printable)?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
Encoding is how email systems convert data that isn't plain text (attachments, images, special characters, emojis) into a format that can travel through SMTP without breaking. SMTP was designed in the 1980s to move plain ASCII text, so anything else needs translation.
The two methods you'll see most:
- Base64 converts binary data (like a PDF or image file) into text. It inflates file size by about 33%, but it's reliable and every email client understands it.
- Quoted-printable is lighter for text with occasional special characters (like an é or a curly quote). It leaves most ASCII alone and only encodes what needs it, so it's more readable if you inspect the raw email source.
You don't usually choose encoding yourself. Your ESP or email library handles it automatically when you attach a file or use non-ASCII characters. The only time you'll think about it is if you're building your own SMTP integration or debugging why an attachment arrives corrupted.
One encoding quirk that affects deliverability: if your email's total size after encoding pushes past certain mailbox limits (often 25-50 MB), it'll bounce. Base64's 33% inflation means a 20 MB video becomes 26.6 MB encoded, which can quietly hit limits you didn't plan for.
And if you're ever inspecting raw email source and see =3D or =20, that's quoted-printable. If you see long strings of random-looking letters and numbers, that's Base64. Both are working correctly. If an attachment shows up as gibberish in the inbox, the encoding failed or the client doesn't support it (extremely rare now, but it happens with very old systems).
Want to see encoding in action? View the source of any email with an image attachment. You can use our Email Source Analyzer to decode what's happening under the hood.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.