The EML (.eml) Format, Explained
iLoveConverter Team 3 min read
On this page
An .eml file is an email message saved as plain text following RFC 822 and the MIME extensions (RFCs 2045–2049). When you export a single email from Thunderbird, Outlook, Gmail or Apple Mail, this is the format you get. Unlike Outlook’s proprietary .msg format, .eml is an open standard that any reasonable email client can read.
An EML file looks like this
From: [email protected]
To: [email protected]
Subject: Meeting tomorrow
Date: Mon, 24 Nov 2026 10:00:00 +0800
Content-Type: multipart/mixed; boundary="----=_Part_123_456"
------=_Part_123_456
Content-Type: text/plain; charset=UTF-8
Hi, reminder about tomorrow's meeting...
------=_Part_123_456
Content-Type: application/pdf; name="agenda.pdf"
Content-Transfer-Encoding: base64
JVBERi0xLjMKJc...
The top part is the header, separated from the body by a blank line. The body may be simple plain text, or multipart with encoded attachments.
EML vs MSG vs MHTML
| Format | Standard | Attachments | Readable text | Round-trip fidelity |
|---|---|---|---|---|
.eml | RFC 822/MIME | Yes | Yes | Good |
.msg | Microsoft proprietary | Yes | No (binary) | Outlook-perfect |
.mhtml | RFC 2557 | Embedded (base64) | Yes | Limited (web pages) |
.msg preserves Outlook-specific features like categories, flags, calendar invites and meeting requests. If you care about those, .msg is your only option; otherwise .eml is more universal.
MIME parts explained
Every EML body uses MIME (Multipurpose Internet Mail Extensions). Common types:
text/plain— plain text body.text/html— HTML version of the body. Many emails have both plain and HTML (multipart/alternative).application/octet-stream— generic attachment.- Image/Video types — attachments declared by MIME type.
Attachments use Content-Transfer-Encoding:
- 7bit / 8bit — raw text, only for ASCII-compatible content.
- quoted-printable — safe for text with special characters.
- base64 — binary-safe encoding, standard for attachments.
Common operations
Convert EML to PDF (Windows/Mac):
# With libpff (Outlook .msg converter handles .eml too via python)
python -m email2pdf mail.eml mail.pdf
# Or print from Outlook/Firefox manually
Convert .msg to .eml (Outlook → open .msg → Save As → .eml), or with libpff tools:
python -m msgconvert input.msg output.eml
Extract attachments from EML:
# Python one-liner
python -c "import email; m=email.message_from_file(open('mail.eml')); \nimport os;\n[(open(p.get_filename(),'wb').write(p.get_payload(decode=True)), p.get_filename()) \n for p in m.walk() if p.get_content_disposition()=='attachment']"
Common problems
- Gmail does not open EML directly — upload to Google Drive and open from there, or import via Takeout.
- Attachments missing after migration — check
Content-Transfer-Encoding; malformed base64 is the usual cause. - Non-ASCII characters garbled — missing
charset=UTF-8declaration; convert withiconvor re-save from source client. - Large email exported from Outlook —
.msgmay save non-standard blobs; use Outlook’s built-in.emlexport for fidelity.
FAQ
Can Outlook open .eml?
Yes — double-click or File → Open, Outlook treats it like a regular email.
Is .eml lossless?
For standard RFC 822/MIME emails, yes. Outlook-specific extensions (categories, flags) may be lost.
Can .eml be opened in Gmail?
Gmail does not natively open .eml from Drive, but you can import via mail.google.com/mail/?view=cm&fs=1&tl=cid:<file> or email it to yourself.
What is the difference between EML and EMLX?
.emlx is Apple Mail’s export format — very similar to .eml but with Apple-specific metadata. Converting between them is straightforward.
Try it yourself — free, right in your browser
Everything mentioned in this guide runs locally on this site: no upload, no watermark, no sign-up.
Format deep-dives: EML (.eml) , PDF (.pdf) , MSG (.msg)