What is an EML file? Where did it come from? What's inside it? And how do you use one? — Complete breakdown plus a free viewer & composer.
EML stands for Electronic Mail. It is a file format used to store individual email messages in a standardized plain-text structure. An EML file is essentially a saved snapshot of a single email — complete with all its headers, body text, HTML content, and attachments encoded within a single file.
Think of it as a "frozen email" — everything that was in that email at the time of saving, preserved in an open, portable, human-readable format that any compliant email client can open.
Files use the .eml extension. They are plain UTF-8 / ASCII text files that follow the MIME standard, meaning you can open them in any text editor — though a proper viewer renders them beautifully.
Defined by the Internet Engineering Task Force (IETF) in RFC 2822 (superseding RFC 822). The MIME extensions are defined in RFC 2045–2049.
Unlike PST (Outlook) or MBOX (which store many emails), each EML file holds exactly one email message — making them easy to share, archive, and audit individually.
No vendor lock-in. Works with Outlook, Thunderbird, Apple Mail, Gmail (import), Evolution, Mutt, and dozens of other clients. Plain text at heart.
Every EML starts with headers: key-value pairs separated by a colon. They contain routing metadata — who sent it, who receives it, when, with what mail server, and more. Headers end at the first blank line.
Headers you'll always see: From:, To:, Subject:, Date:, Message-ID:. There are dozens of optional headers like X-Mailer:, DKIM-Signature:, and Received: chains.
After the blank line comes the body. For simple emails this is just plain text. For rich emails it's a MIME multipart structure, encoding text/plain, text/html, and attachments as separate "parts" divided by boundary strings.
Each body part has its own mini-header declaring its content type and encoding (base64, quoted-printable, or 7bit).
The EML format was not invented by a single person — it evolved through IETF (Internet Engineering Task Force) working groups, especially the IMF (Internet Message Format) and MIME working groups throughout the 1980s–2000s.
RFC 561 defined the earliest conventions for email header fields on ARPANET. The "From:", "Date:", "Subject:" pattern was born here.
Dave Crocker & co. standardized the header format that all modern email still uses. This is the direct ancestor of .eml.
Nathaniel Borenstein & Ned Freed invented MIME (Multipurpose Internet Mail Extensions) — adding support for binary attachments, HTML bodies, and non-ASCII characters inside emails.
P. Resnick updated and clarified RFC 822 for the modern internet. This is the primary spec that .eml files implement today.
The current authoritative specification for the Internet Message Format, obsoleting RFC 2822. Still fully backwards compatible with all existing .eml files.
Used by every major email client. Outlook, Thunderbird, Apple Mail all export to .eml. The format is 50+ years old and shows no signs of being replaced for archiving.
Transport Headers Added by mail servers as the email travels hop-to-hop. Received: traces the route; DKIM-Signature: verifies authenticity; Return-Path: says where bounces go.
Message Headers Set by the sender's mail client. From, To, Subject, Date, Message-ID are the canonical five. MIME-Version and Content-Type describe how the body is structured.
Boundary Strings A unique string generated per email that separates MIME parts. Must not appear inside any body content. Prefixed with --; the final boundary ends with --.
Content-Transfer-Encoding Tells the receiver how to decode each part. base64 for binary data, quoted-printable for text with special characters, 7bit for plain ASCII.
multipart/alternative Used to send both plain text and HTML versions of the same email. The receiver's client picks the richest version it can render — HTML preferred, plain-text fallback.
multipart/mixed Used when there are attachments. Contains the message body (possibly itself a multipart/alternative) plus one or more attachment parts. The outermost wrapper.
The core purpose of EML is to store email messages in a standard, interoperable format that isn't tied to any specific email client or vendor. It solves the portability problem — you can move emails between Outlook, Thunderbird, Apple Mail, and any other compliant client by exporting/importing .eml files.
This also makes EML the format of choice for legal holds, compliance archiving, and eDiscovery — you get a portable, court-admissible snapshot of each email message.
Since EML files are plain text, security researchers and email administrators can open them and inspect every header to trace email routing, verify DKIM signatures, identify spoofing attempts, and debug deliverability issues.
Mail server logs tell you what happened at your server. EML files tell you what the email looked like in full fidelity — headers, content, and all.
Developers use EML files to test email rendering across different clients without sending real emails. Write an EML, open it in Outlook AND Thunderbird AND Apple Mail, check consistency.
Courts and compliance teams accept EML as a standard format for email evidence. The full header chain proves authenticity and timestamps routing through each mail server.
Python's email module, Node's mailparser, and dozens of libraries parse EML files directly — enabling automated data extraction, spam analysis, and email pipeline testing.
Enterprise archiving platforms (Mimecast, Proofpoint, Barracuda) store every email as an EML file internally for long-term retention and compliance retrieval.
Investigators extract EML files from seized devices to reconstruct email communications in legal cases without needing the original email client installed.
Tools like Mailhog and Mailpit catch outgoing emails from web apps as .eml files — letting QA teams inspect rendered HTML, headers, and attachments in automated tests.
Security researchers collect malicious emails as EML files for analysis. Sandboxes ingest EML files to extract URLs, attachments, and social engineering patterns.
Zendesk, Freshdesk, and Salesforce can import EML files to reconstruct customer email threads directly into tickets — preserving formatting and attachments.
Tools like Aid4Mail, Emailchemy, and MailMate use EML as a universal intermediate format when migrating mailboxes between services (Gmail → Outlook, etc.).
Litmus, Email on Acid, and similar platforms accept EML uploads to test rendering across 90+ email client and device combinations before sending campaigns.
SharePoint and similar DMS platforms can store EML files as documents, allowing emails to be filed alongside related contracts and project files.
Parse any .eml file into a clean readable view, or build a valid EML file from scratch — all in your browser, no upload to servers.