What is the EML file format?
Files with the .eml extension contain a single email message stored as a single file, comprising the message headers, body, and any attachments. The format is used by a wide range of email client programs. It conforms to RFC 5322 (which superseded the original RFC 822 from 1982) and uses MIME encoding for multi-part content and attachments. Because .eml is a plain-text format, any .eml file can be opened in a text editor to inspect its raw headers and MIME-encoded content.
A message header includes:
- Email addresses of the sender and recipient(s),
- Subject of the message,
- Date, time, and the chain of mail servers that relayed the message,
- Additional metadata about content type, embedded links, and attachments.
.eml files can be sent as attachments to other email messages. They can be opened in most email client programs - including Mozilla Thunderbird, Microsoft Outlook, and Apple Mail. Such programs also typically allow saving messages in .eml format to disk, for example for archiving or backup. Related formats include .msg (Microsoft's proprietary Outlook message format), .mbox (a single-file mailbox that concatenates multiple messages), and .emlx (Apple Mail's per-message variant with an extra metadata wrapper).
Security & safety
RISK: MEDIUMThe .eml file itself is plain text and can't run on its own, but an email can carry the usual email threats: malicious attachments (open the .eml in a real client so it sandboxes/flags them rather than blindly extracting), phishing links, and remote-image tracking pixels that report when you open the message. Treat an unexpected .eml the same as an unexpected email - don't open attachments inside it or click links unless you trust the source. Headers in the file can be inspected (Received, SPF/DKIM/DMARC results) to judge whether the sender is genuine, which is one reason .eml is used as evidence.
Format details
in a nutshellPrograms that open EML files
Technical details
deep spec| MIME type | message/rfc822 |
| Governing standards | RFC 5322 (message format and headers), RFC 2045-2049 (MIME body parts and encoding) |
| File encoding | Plain text (US-ASCII base); non-ASCII content encoded per MIME rules (Base64, Quoted-Printable, or a declared charset such as UTF-8) |
| Magic bytes | None - no binary signature; file conventionally begins with a header field such as "From:", "Received:", or "Date:" |
| Attachment encoding | Binary attachments encoded as Base64 within MIME multipart/mixed parts; Content-Disposition: attachment marks them for download |
| Multi-part structure | MIME multipart/mixed for combined message body and attachments; multipart/alternative for HTML + plain-text fallback body |
| HTML body support | Carried as a text/html MIME part, typically paired with a text/plain fallback inside a multipart/alternative wrapper |
| Inline images | Embedded via Content-ID (cid:) URIs referenced in the HTML body, declared with Content-Disposition: inline |
| Encryption | S/MIME (RFC 5751) using the application/pkcs7-mime MIME type, or PGP/MIME (RFC 3156) |
| Digital signatures | S/MIME detached signature (multipart/signed with application/pkcs7-signature) or OpenPGP signature via PGP/MIME |
| Line endings | CRLF (\r\n) required by RFC 5322; many email clients also accept LF-only files |
| Line length limit | 998 characters per line (RFC 5322 hard limit); 78 characters per line recommended for readability |
| Character set declaration | Charset declared in the Content-Type header of each MIME part (e.g., UTF-8, ISO-8859-1); default is US-ASCII |
| Apple Mail variant | .emlx - wraps the RFC 5322 message in an XML/plist metadata envelope; used internally by Apple Mail for per-message storage |
| Portability | A single .eml file is entirely self-contained and can be moved between any RFC 5322-compliant client without conversion |
| Released | RFC 822 (1982), MIME RFC 2045 (1996); .eml extension popularized by Outlook Express, late 1990s |
| Open standard | Yes · royalty-free |
| Specification | www.rfc-editor.org |
EML conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about EML files.