What is a base64-encoded body?

Still have a question, spotted an error, or have a better explanation or a source we should cite?

A base64-encoded body is what happens behind the scenes when an email contains binary data (like images, PDFs, or any attachment). SMTP, the protocol that delivers email, only speaks 7-bit ASCII. It can't carry raw binary data without corruption. So before your attachment travels, it gets converted into plain text characters using base64 encoding. The receiving server decodes it back to the original file.

This conversion happens automatically. You never see it unless you peek at the raw email source. Most email clients decode base64 instantly and show you the attachment as if nothing happened.

The catch: base64 encoding inflates file size by about 33%. Three bytes of binary data become four characters of text. That's why a 20 MB attachment often exceeds a 25 MB sending limit once encoded. If you've ever hit a size limit with an attachment that looked smaller than the cap, this is why.

This matters most when you're sending large files or embedded images. If your newsletter includes high-resolution photos embedded as base64, the email size balloons fast. That can slow delivery, increase the chance of clipping in Gmail (which truncates messages over 102 KB), or push you over your ESP's size limit entirely. Some senders avoid this by hosting images externally and linking to them instead of embedding. That keeps the email lean, but it means images won't display if the recipient blocks remote content. Trade-off: smaller email size vs. guaranteed image display.

One more thing: base64 encoding applies to the email body when it contains non-ASCII characters (like emoji or non-Latin scripts). If your subject line or body uses anything beyond basic English letters and numbers, it might get base64-encoded too. Most modern email systems handle this without issue, but older systems sometimes struggle with encoded subject lines.

If you're troubleshooting delivery issues with attachments or images, check the encoded size. Our Source Analyzer shows you the raw MIME structure, including base64 sections and their actual size. Or just ask us if something feels off (we're here for that).

Contributors

Who worked on this answer

Every name links to their profile. Every company links to their site. Real people, real accountability.

Ask an AI · tailored to your setup

Get help with attachment sizing →

I read this on the Email Almanac about "What is a base64-encoded body": "Base64 encoding converts binary attachments (images, PDFs, files) into ASCII text so SMTP can deliver them. It happens automatically but inflates file size by about 33%. A 20 MB attachment becomes ~26 MB encoded, which often exceeds 25 MB sending limits. Gmail clips messages over 102 KB, so base64-encoded images in newsletters can trigger truncation. Some senders avoid this by hosting images externally instead of embedding." Help me understand how this applies to MY specific situation. I need: 1. Whether my attachment size issue is base64-related 2. How to calculate encoded size before sending 3. Whether to embed images or host them externally 4. How to check if my emails are getting clipped --- My details (fill in what applies): - Email platform/ESP: e.g. Mailchimp, SendGrid, custom SMTP - Attachment types: e.g. PDFs, images, documents - Typical attachment size: e.g. 5 MB per file - Email type: [newsletter with embedded images / transactional with attachments / both] - Current challenge: [e.g. hitting size limits, images not displaying, Gmail clipping]

Edit the yellow boxes, then send to the AI of your choice.