EML vs. MSG: The Two Email File Formats Compared
With mailmd How to Delete a Gmail Account Without Losing Your EmailsOn this page
When you save an email as a file, its format affects which programs can open it and which details it keeps. EML is a widely used format based on the standard structure for Internet email. MSG is Microsoft Outlook’s format for storing individual messages and other Outlook items.
Choose EML when you need a file that works across different email clients or is easy to inspect and process. Choose MSG when you need to retain Outlook-specific information. Neither format guarantees that every detail from the original mailbox will survive an export, so check how your email program handles headers and metadata before relying on a saved copy.
How EML and MSG store email #
An EML file stores one email in a format based on Internet message standards. It contains headers, such as the sender and subject, followed by the message body. MIME, the standard used to carry email content and attachments, lets the file include different text formats and binary attachments. The result is often readable in a text editor, although encoded content and attachments may not look like ordinary text. The EML format description explains its relationship to email message standards and MIME.
An MSG file stores an Outlook item in a Microsoft compound file, a binary container with multiple named streams, or separate sections of data. Outlook uses these streams to store the message content and its properties. An MSG file can also represent items such as contacts, tasks, and appointments. The MSG format overview describes its compound-document structure, while Microsoft’s MSG specification notes that programs can store attachment data in different ways.
EML uses a format that many email tools support. MSG stores Outlook items using Outlook’s own data structure.
EML vs. MSG at a glance #
| Difference | EML | MSG |
|---|---|---|
| Storage | Message headers and MIME body in a message format | Outlook item stored in a binary compound file |
| Compatibility | Supported by a range of email clients and tools | Strongest in Outlook; support outside Microsoft tools varies |
| Readability | Often inspectable as text, with encoded sections for some content | Requires a tool that understands the binary structure |
| Outlook-specific data | May omit properties specific to Outlook or Exchange | Designed to store Outlook properties |
| Common use | Sharing, cross-client access, and programmatic processing | Saving an Outlook message or another Outlook item |
EML is generally easier to move between platforms. MSG is more suitable when Outlook-specific properties matter, though what survives still depends on the exporting program and the tool that later opens the file. CodeTwo’s format comparison describes EML as a standard used by multiple email clients and MSG as Microsoft’s format for individual Outlook items.
Which format should you choose? #
Use EML when you want a message that a variety of email programs can read, or when a developer needs to parse message headers and MIME content. Its text-based structure makes the message easier to inspect, but attachments and some body content appear as encoded data rather than readable text.
Use MSG when you are saving an item from Outlook and want to keep Outlook-specific information, such as properties associated with that item. MSG is a suitable choice for exchanges that use Outlook, but its proprietary binary structure can make it harder to use with unrelated tools. The LEADTOOLS format reference describes MSG as a compound binary file and EML as a MIME-based format.
For long-term records, choose based on the details you need to retain and the software that must open the files later. Keep an original mailbox export or another controlled record when a saved message alone is not enough. Do not assume a conversion from MSG to EML preserves all Outlook properties: MIME conversion can discard MAPI-specific data, the properties Outlook uses to represent its items.
Export behavior can affect what the file keeps #
The file extension alone does not guarantee that an export contains every original header or Outlook property. In particular, CodeTwo reports that EML files saved from the new Outlook for Windows or Outlook on the web using the methods it describes omit original message headers. For diagnostic or investigative work, verify the exported file’s headers before treating it as a complete record. CodeTwo recommends MSG for preserving headers in that export context.
Saving options also depend on the Outlook version. In classic Outlook for Windows, you can drag a message to a local folder or desktop to save it as MSG, or use File > Save As and select an Outlook message format. CodeTwo says classic Outlook for Windows has no built-in option to save directly as EML. Outlook for Mac supports saving EML by dragging a message to a local folder or desktop; Gmail offers an EML download through Show original and Download Original, as described in the export instructions.
Free and open source
Try mailmd
mailmd is a free command-line tool that copies your email into Markdown files on your computer, one file per message. It works with any IMAP mailbox, and with Gmail and Outlook through their own APIs.
Install
$ curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh
Set it up with your coding agent
Set up mailmd so you can read my email. Use https://github.com/vincentsch/mailmd: read its AGENTS.md and follow the steps. Connect my mailbox and run the first sync. Then show me where the files are.