Email encoding explained: MIME, Base64 and quoted-printable
Email was built to carry plain English text. Everything else, from accents and emoji to PDFs and photos, has to be packed into that plain text. This is how it works, and what goes wrong.
Email uses MIME to split a message into parts (plain text, HTML, attachments). Text with accents or emoji is usually sent as UTF-8, packed with quoted-printable (which shows up as =C3=A9) or Base64. Attachments use Base64, which makes them about a third bigger. Garbled characters such as é mean an app read UTF-8 text as an older character set.
MIME: how one email holds many parts
A modern email is usually a multipart message: a container with several parts separated by a boundary line. A typical marketing email looks like this:
Content-Type: multipart/mixed
├─ multipart/alternative
│ ├─ text/plain (the plain-text version)
│ └─ text/html (the designed version)
└─ application/pdf (an attachment, Base64)
Mail apps show the HTML part if they can and fall back to the plain-text part. Sending both is good practice for deliverability and accessibility.
The three encodings
| Encoding | Used for | What it looks like |
|---|---|---|
| 7bit / 8bit | Plain text that needs no conversion | Normal text |
| Quoted-printable | Mostly-English text with some special characters | caf=C3=A9 for "café"; lines end in = when wrapped |
| Base64 | Attachments, images, and text in non-Latin scripts | Long blocks such as SGVsbG8gd29ybGQ= |
Base64 turns every 3 bytes into 4 characters, so attachments grow by about 33%. Use the attachment size calculator to see the real size.
Character sets and UTF-8
The charset in the Content-Type says how to turn bytes into letters. Almost everything today should be UTF-8, which covers every language and emoji. Subject lines and names with special characters use a short form called an "encoded word", such as =?UTF-8?Q?Caf=C3=A9?=.
Fixing garbled characters
| You see | Likely cause |
|---|---|
é instead of é, ’ instead of an apostrophe | UTF-8 text read as Windows-1252 or ISO-8859-1. The sender's charset label is wrong or missing. |
=C3=A9 or =20 in the text | Quoted-printable that wasn't decoded, often from copying the raw message. |
A winmail.dat attachment | Outlook sent "Rich Text" format. The sender should switch to HTML or plain text. |
| Question marks or boxes | The font has no symbol for that character, or the text was converted to a charset that lacks it. |
If you send email from your own code or form, set Content-Type: text/plain; charset=UTF-8 (or text/html) and let your mail library handle the encoding.
Questions people ask
- Why are my email attachments bigger than the files?
- Base64 encoding turns every 3 bytes into 4 characters, adding about a third to the size.
- What does =20 mean in an email?
- It's a quoted-printable code for a space. =3D is an equals sign and =C3=A9 is é in UTF-8.
- What is MIME in email?
- Multipurpose Internet Mail Extensions: the standard that lets one email contain several parts, such as plain text, HTML and attachments, in any language.
Sending one email to a whole list? Check the addresses first with Veml, which removes bad and risky emails before you hit send. (Veml and EmailNa have the same owner.)