What is base64 encoding and when is it bad for deliverability?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
Your designer exports a template from a visual editor and it looks fine in preview, but once it's live, spam filter complaints start trickling in and your HTML file is inexplicably large. One common culprit that's easy to miss: the template has images embedded as base64 data rather than linked from a URL.
To understand why this matters, it helps to know what base64 encoding actually does. When email HTML references an image with a URL (like <img src="https://cdn.example.com/banner.jpg">), the email carries a pointer and the subscriber's client fetches the image from that server. Base64 takes a different approach: it converts the image file itself into a long string of text characters and embeds that string directly in the HTML. The email carries the image rather than a link to it. This can sound appealing because images "can't break" if the server goes down, but in practice it causes more problems than it solves.
The most immediate problem is email size. A 50KB image becomes roughly 67KB as base64 text because the encoding adds about 33% overhead. Do that with five images and your HTML can balloon past the 102KB threshold where Gmail clips messages. Clipped emails cut off your footer, your unsubscribe link, and your CAN-SPAM-required physical address. That's a compliance issue on top of a deliverability one. Spam filters also treat large base64 blocks with extra scrutiny because attackers have historically used the format to obscure malicious payloads. You don't have to be doing anything wrong for this to trip a filter. Check the spam filter triggers guide for a fuller list of signals that affect inbox placement.
Base64 sneaks into templates most often through design tools that offer "export to HTML" features (some embed images inline by default) and through cid: attachment-style images that get converted automatically. The fix is to host your images on a CDN or your ESP's media library and reference them with a standard src URL. SendGrid, Mailchimp, and most other ESPs have built-in image hosting for exactly this reason. Review My Emails can scan your template HTML and flag base64 blocks before they reach the inbox.
And If you're not sure whether your template has embedded images, search the HTML source for the string data:image/. Any match is an embedded image to extract and re-host. It's one of the higher-impact cleanup tasks for keeping your email under size thresholds, and it usually takes under ten minutes to fix once you've found the offending block.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.