What Is an EML File?
An EML file is a single email message saved in the standard MIME format defined by RFC 5322. The file extension .eml stands for “Electronic Mail,” and each file contains one complete email — headers, body text, HTML content, and attachments all in a single plain-text file.
EML is the closest thing the email world has to a universal format. Unlike PST (which is Microsoft proprietary) or EMLX (which is Apple-specific), EML is based on an open internet standard that virtually every email client can read. When you need maximum portability for email messages, EML is the format to use.
The format has been around since the early days of internet email, evolving from the original RFC 822 specification (1982) through RFC 2822 (2001) to the current RFC 5322 (2008). This long history means EML support is deeply embedded in every major email platform.
The Structure of an EML File
Message Headers
Every EML file begins with a block of headers. These are key-value pairs that describe the message:
From: sender@example.com
To: recipient@example.com
Subject: Meeting tomorrow
Date: Wed, 26 Mar 2026 10:30:00 +0100
Message-ID: <unique-id@example.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_12345"
Common headers include:
- From — Sender’s email address
- To — Primary recipient(s)
- CC — Carbon copy recipients
- BCC — Blind carbon copy (rarely present in received messages)
- Subject — Message subject line
- Date — Date and time the message was sent
- Message-ID — Unique identifier for the message
- Content-Type — MIME type of the message body
- X-headers — Custom headers added by mail servers and clients
Message Body
After the headers (separated by a blank line), the body follows. For simple text-only messages, the body is plain text. For HTML messages, the body uses MIME multipart structure:
- multipart/alternative — Contains both plain text and HTML versions
- multipart/mixed — Contains the message body plus attachments
- multipart/related — Contains HTML with inline images
Attachments
Attachments are encoded within the EML file using Base64 encoding. Each attachment appears as a MIME part with its own headers:
Content-Type: application/pdf; name="report.pdf"
Content-Disposition: attachment; filename="report.pdf"
Content-Transfer-Encoding: base64
JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMg...
This means EML files can be quite large when they contain attachments — the Base64 encoding adds approximately 33% overhead to the original attachment size.
Which Email Clients Support EML?
EML is supported by a remarkably wide range of email clients:
| Email Client | Platform | EML Support |
|---|---|---|
| Mozilla Thunderbird | Windows, Mac, Linux | Native (open/save/import) |
| Windows Mail | Windows | Native |
| Windows Live Mail | Windows | Native |
| Apple Mail | macOS | Open and import |
| Outlook | Windows | Open (drag and drop) |
| eM Client | Windows, Mac | Native |
| The Bat! | Windows | Native |
| Mailspring | Windows, Mac, Linux | Import |
| Evolution | Linux | Native |
| KMail | Linux | Native |
Even email clients that do not directly open EML files can usually import them. The format’s universality is its greatest strength.
How to Open EML Files
On Windows
Double-click: If you have Windows Mail, Outlook, or Thunderbird installed, double-clicking an EML file should open it in your default mail application.
Drag and drop into Outlook: Open Outlook, then drag the EML file from File Explorer into an Outlook folder. Outlook will import the message.
Using Thunderbird: Thunderbird opens EML files natively. You can also drag EML files into any Thunderbird folder to import them.
On macOS
Double-click: If Apple Mail is configured, double-clicking an EML file opens it in Mail.app.
Using Thunderbird: Install Thunderbird and use it to open EML files directly.
On Linux
Using Thunderbird or Evolution: Both handle EML files natively. You can also open EML files with a text editor to inspect the raw content.
In a Text Editor
Because EML files are plain text, you can open them in any text editor (Notepad, VS Code, Vim, nano) to inspect headers and content. HTML body will appear as raw HTML code, and attachments as Base64 strings, but the headers and plain-text body are immediately readable.
Without Any Email Client
If you do not have an email client installed and just need to read a few EML files, several free online EML viewers exist. Alternatively, you can rename the file to .mht and open it in a web browser for basic viewing.
Converting EML Files
Why Convert EML?
While EML is highly portable, there are scenarios where conversion is necessary:
- Consolidating into Outlook — You have hundreds of EML files that need to be imported into a single PST archive
- Creating MBOX archives — Combining individual EML files into MBOX format for Thunderbird
- Format requirements — Your organization or legal team requires a specific format
- Simplifying management — Managing thousands of individual files can be impractical
EML to PST
Convert EML to PST when you need to import messages into Microsoft Outlook. MailtoPst takes your EML files and produces a single PST archive with folder structure preserved.
EML to MBOX
Convert EML to MBOX to combine individual messages into a single MBOX file suitable for Thunderbird and other MBOX-compatible clients.
EML to MSG
Convert EML to MSG when you need individual messages in Microsoft’s MSG format, for example when working with Outlook-specific workflows or legal production requirements.
EML to EMLX
Convert EML to EMLX for import into Apple Mail. The conversion adds the byte count header and Apple-specific plist metadata that EMLX requires.
Bulk Conversion
MailtoPst supports batch conversion of multiple EML files at once. Upload a folder of EML files, select the target format, and download the results. All processing happens on GDPR-compliant EU servers with automatic cleanup after 24 hours.
Working with EML Files Programmatically
Parsing EML in Python
Python’s built-in email module can parse EML files:
import email
from email import policy
with open("message.eml", "r") as f:
msg = email.message_from_file(f, policy=policy.default)
print(f"From: {msg['from']}")
print(f"Subject: {msg['subject']}")
print(f"Date: {msg['date']}")
Parsing EML in JavaScript/Node.js
Libraries like mailparser handle EML parsing in Node.js:
const { simpleParser } = require("mailparser");
const fs = require("fs");
const source = fs.createReadStream("message.eml");
const parsed = await simpleParser(source);
console.log(parsed.from.text);
console.log(parsed.subject);
Creating EML Files
You can create EML files programmatically by constructing valid MIME messages. This is useful for testing, data generation, or custom email migration scripts.
EML File Best Practices
Naming Conventions
When saving EML files, use a consistent naming scheme that makes them searchable:
2026-03-26_sender_subject.eml— Date-based, easy to sort chronologically001234_meeting-notes.eml— Sequential numbering for archives- Avoid special characters in filenames that may cause issues across operating systems
Folder Organization
For large collections of EML files, mirror your original mailbox folder structure:
archive/
├── Inbox/
│ ├── message001.eml
│ └── message002.eml
├── Sent/
│ └── message003.eml
└── Projects/
└── ProjectA/
└── message004.eml
Character Encoding
EML files support multiple character encodings through MIME headers. For maximum compatibility:
- Use UTF-8 for message bodies when possible
- Ensure Content-Type headers correctly specify the encoding
- When converting from other formats, verify that international characters (accents, CJK, Cyrillic) are preserved
Attachment Handling
Remember that attachments are Base64-encoded within the EML file, making it approximately 33% larger than the original attachment. For large attachment collections:
- Consider extracting attachments separately
- Store attachment references rather than embedded content for archival
- Be aware of filesystem limitations when dealing with thousands of EML files with large attachments
EML for Legal and Compliance
eDiscovery
EML files are widely used in legal proceedings because:
- Each message is a self-contained file, easy to tag, review, and produce
- Headers are human-readable and can be verified for authenticity
- The standard MIME format is well-understood by forensic tools
- Individual messages can be searched, filtered, and organized without specialized software
Evidence Preservation
When preserving email as evidence:
- Maintain the original EML file without modification
- Calculate and record hash values (SHA-256) for each file
- Document the chain of custody
- Store on write-once media when possible
GDPR and Data Protection
EML files containing personal data fall under GDPR jurisdiction for European organizations. When handling EML archives:
- Inventory personal data within EML files
- Apply retention policies — delete EML files that have exceeded their purpose
- Respond to data subject access requests by searching EML collections
- Use secure transfer methods (HTTPS, SFTP) when sharing EML files
- Choose conversion tools with GDPR compliance, like MailtoPst with its EU-based servers and automatic 24-hour file deletion
EML vs. Other Email Formats
EML vs. MSG
| Feature | EML | MSG |
|---|---|---|
| Standard | IETF RFC 5322 | Microsoft proprietary (OLE) |
| Readability | Plain text (human-readable) | Binary (requires parser) |
| Cross-platform | Excellent | Limited (mostly Windows) |
| Metadata | Standard email headers | Rich Outlook-specific properties |
| File size | Compact | Slightly larger due to OLE overhead |
| Attachments | Base64 encoded | OLE embedded objects |
Verdict: EML is better for portability and cross-platform use. MSG preserves Outlook-specific metadata better.
EML vs. MBOX
| Feature | EML | MBOX |
|---|---|---|
| Messages per file | One | Many |
| File management | Many small files | Few large files |
| Random access | Instant (open any file) | Requires parsing |
| Concurrent access | Safe | Risky (file locking issues) |
| Commonly used by | Most email clients | Thunderbird, Unix/Linux |
Verdict: EML is better for individual message access and management. MBOX is better for compact storage of large collections.
EML vs. EMLX
| Feature | EML | EMLX |
|---|---|---|
| Standard | RFC 5322 | Apple proprietary extension |
| Platform | Universal | macOS only (Apple Mail) |
| Extra metadata | None | Apple Mail flags and properties |
| Conversion | N/A | Strip byte count and plist |
Verdict: EML is the universal choice. EMLX adds Apple-specific features but limits compatibility.
Troubleshooting EML Issues
EML File Will Not Open
- No associated application: Set your default email client to handle .eml files
- Corrupted file: Open in a text editor to check if the content is intact
- Large attachments: Some viewers struggle with very large EML files; try a more robust client
Garbled Characters
- Check the Content-Type header for the correct charset
- Ensure your email client supports the character encoding used
- Try opening in a text editor with explicit UTF-8 encoding
Missing Attachments After Conversion
- Verify the source EML file contains the attachment (check for Base64 content)
- Some conversion tools skip inline images; verify the tool handles all MIME parts
- Check for multipart boundaries that may be malformed
EML Files Are Too Large
- Extract and store attachments separately
- Use compression (ZIP, GZIP) for storage
- Consider converting to MBOX format to reduce filesystem overhead from many small files
Frequently Asked Questions
What program opens EML files?
Most email clients open EML files, including Mozilla Thunderbird, Windows Mail, Apple Mail, and Microsoft Outlook. On Windows, double-clicking an EML file typically opens it in your default email application. You can also open EML files in any text editor to view the raw content.
Can I convert EML to PST?
Yes. Convert EML to PST using MailtoPst to consolidate individual EML messages into an Outlook-compatible PST archive. The conversion preserves all headers, body content, attachments, and folder structure.
Are EML files safe to open?
EML files are plain text and cannot execute code by themselves. However, they can contain HTML with potentially malicious links, and attachments within EML files could be harmful. Apply the same caution you would with any email — do not click suspicious links and scan attachments with antivirus software.
How do I create an EML file?
Most email clients let you save or export individual messages as EML files. In Thunderbird, drag a message to your desktop. In Outlook, save a message as “Outlook Message Format - Unicode (.msg)” then convert, or use a tool to export directly to EML. You can also convert PST to EML to extract all messages from an Outlook archive.
What is the difference between EML and EMLX?
EML is the standard MIME email format used by most email clients. EMLX is Apple’s extension used by Apple Mail, which wraps the standard EML content with a byte count header and an XML property list footer containing Apple Mail-specific metadata. You can convert between the two formats easily.
Can I search within EML files?
Yes. Because EML files are plain text, you can search their contents using any text search tool — operating system search, grep, or dedicated email search tools. This is one of the major advantages of EML over binary formats like PST or MSG.
How do I convert multiple EML files at once?
MailtoPst supports batch conversion. Upload multiple EML files or a ZIP archive of EML files, select your target format (EML to PST, EML to MBOX, etc.), and download the converted output. All processing happens on secure EU servers with automatic deletion after 24 hours.