File formats

Every Email File Format Explained And Which One You Have

Two questions sort all of them. One message or a whole mailbox. Published structure or private. Everything else about portability follows from those two answers.

17 min read

Two questions sort every email format there is. Does the file hold one message or a whole mailbox. Was its structure published or kept private. Answer those two and you know how portable your file is, what software will read it and what you stand to lose if you move it somewhere else.

People rarely go looking for an email format. One arrives attached to a job that has to be finished today. The only real question is what to do with it. Start by working out which of them you are holding, because every decision after that follows from the answer.

Formats are not protocols. IMAP, POP3 and Exchange describe how mail moves between machines. MBOX, PST and EML describe how it sits on a disk once it arrives. A mailbox can use any protocol and still be stored in any format, which is the single commonest confusion in this whole subject.

The Two Questions That Sort Every Mail Format

The formats look like a long unrelated list until you place them on two axes. Sorted that way, a format you have never seen still tells you what it will and will not do.

Structure publishedNever published
One message per fileEML, MHT, MSGEMLX
Many messages per fileMBOX, PST, OSTOLM, EDB, DBX, NSF
The left column has a specification anyone can build against, which is why third party readers for those formats exist at all. A published specification and an open format are separate claims, since Microsoft still controls PST and MSG outright. Everything in the bottom row carries folder structure that the top row has to store in directory names instead.

The top left corner is where mail goes when it needs to outlive the program that made it. The bottom right is where mail lives while a specific program is looking after it. Most migration work is a move from the second to the first and back again.

How to Tell Which Format You Have

The extension is a hint rather than an answer, because it is only a label the operating system reads. The bytes at the start of the file are the actual evidence.

FormatThe file opens onWhere it came from
EMLReadable headers such as Received: or From:Saved from almost any mail client
MBOXFrom and a space, with no colon after itThunderbird, Apple Mail, a Takeout export
EMLXA number on a line by itselfApple Mail message storage
PST or OSTThe bytes !BDNOutlook on Windows
MSGThe bytes D0 CF 11 E0, unreadable as textA message dragged out of Outlook
OLMThe bytes PK, because it is a ZIPOutlook for Mac, export only
MHTFrom: with a colon, naming the browser that saved itSaved as a web archive
DBXBinary, with the file named after the mail folderOutlook Express, long retired
NSFBinary, usually far larger than a mailbox alone would needIBM or HCL Notes
The first line is the whole check. Every editor displays it. Two of these are worth care. MBOX and MHT can both open on the word From, so the colon is the test. The compound file signature belongs to Word, Excel and installer files as much as to MSG, so it tells you the container rather than the contents.

If nothing on that list matches, the file is probably not mail at all. A ZIP that is not an OLM, a database from some other application or a renamed archive all turn up regularly in folders labelled backup.

Age is the other clue, useful when an archive arrives with no context at all. A format cannot predate the software that invented it, so the date on the folder rules some answers straight out.

  1. Early Unix mail 1970s MBOX. Older than everything else on this page. Still the format a Takeout export arrives in.
  2. RFC 822 1982 The standard behind every EML. Revised several times since, though a message written in 1990 still parses.
  3. Outlook Express era Late 1990s DBX and MBX. An archive carrying either almost certainly came off a Windows machine of that vintage.
  4. Mac OS X 10.4 2005 EMLX. A Mac mail archive older than this will not contain any.
  5. Outlook for Mac 2011 2011 OLM. The newest format on this page. Also the only one Windows Outlook has never learned to read.
Dates the format first appeared, not the last time it was used. Every one of these is still in circulation, which is why an inherited archive can hold four decades of formats at once.

Formats That Hold a Single Message

These four store one message each. They are the formats you want when mail has to be read by someone else, quoted in a document or kept for a long time, because none of them needs a particular program to make sense.

EML

An EML file is a message written to disk exactly as it arrived, header block first and body underneath, with nothing separating them but the empty line the standard requires. The structure is RFC 5322, the same specification the message obeyed while it was in transit. No container is placed around it and no field is removed.

Attachments ride along inside it, encoded as base64 so that binary files survive a channel built for text. That is why EML travels so well. Any mail client, any platform, any decade. The awkward part is never the file itself but the folder around it, which is where EML runs into trouble at volume. It is also why a large mailbox in EML form is unwieldy, since forty thousand messages means forty thousand files and a file system that has to think about all of them at once.

MSG

MSG is what Outlook produces when a message is dragged out of it. Underneath it is a compound file, a small structured container rather than text, which is why a plain editor renders it as mostly noise.

The reason the format exists is that Outlook stores properties an ordinary message has no field for. Categories, flags, follow up reminders, voting buttons and the internal address book entries behind a sender. MSG keeps those. Any other format drops them, which is what people mean when they say something was lost in conversion.

Those extra fields are MAPI properties, named for the Messaging Application Programming Interface that Outlook and Exchange are built on. Inside the file each one gets a stream named after its number, which is why so little software can read an MSG. It is the thread running through three formats on this page. MSG carries MAPI properties for one message. PST and OST are MAPI stores holding many. Anything outside that family has nowhere to put them.

EMLX

Apple Mail introduced EMLX with OS X 10.4 in 2005. The Library of Congress format registry describes it as three parts in one file.

  1. 875 Byte countHow long the message that follows is, written in plain digits
  2. From: Payroll <payroll@example.org>
    Subject: March statement attached
    The messageOrdinary MIME content, identical to what an EML file would hold
  3. <plist version="1.0">
    <key>flags</key>
    Property listApple Mail's own metadata, including read and replied flags
Strip the first line and the trailing property list and an EMLX becomes an EML. That is the whole difference between the two. It is also the reason conversion between them is close to lossless in one direction.

MHT

MHT is a web archive rather than a mail format, though it turns up constantly in mail work. It bundles a page and everything the page needs, images and stylesheets included, into a single MIME document. Saving a message as MHT gives you something that opens in a browser and looks right without any attachments going missing.

TNEF, The winmail.dat Problem

TNEF is not a mail format so much as a wrapper Outlook sometimes puts around one. When Outlook sends a message in Rich Text Format to somebody whose client has never heard of TNEF, the formatting and every real attachment get packed into a single file called winmail.dat. That is what the recipient sees instead of the invoice or the photograph they were promised.

The fix belongs to the sender. Nothing the recipient does is a proper solution, because the attachments are intact inside the wrapper but the message was addressed in a format their software cannot unpack. Sending as HTML or plain text stops it happening at all. A winmail.dat already in your inbox can be opened. Tell the sender anyway, since otherwise the next one arrives exactly the same way.

Formats That Hold a Whole Mailbox

These six hold many messages in one file, usually with the folder structure as well. That convenience is exactly what ties them to the software that wrote them.

MBOX

Tree of files
Mail/
  Inbox
  Sent
  Clients/
    Acme
    Globex

Each folder is its own file. The tree is the directory, so the file system holds the shape.

PST

Tree inside a file
archive.pst
  └ Inbox
  └ Sent
  └ Clients
      └ Acme
      └ Globex

One file on disk. The whole hierarchy lives inside it, which is why nothing outside can see it without parsing.

Maildir

Tree of directories
Inbox/
  new/
  cur/
  tmp/
Sent/
  new/
  cur/
  tmp/

Every message is a file. Three subfolders per mailbox track what has been seen and what has not.

The same five folders, laid out three ways. Where the hierarchy lives decides almost everything else: what can read it, what happens when two programs touch it at once and whether copying one folder is a file operation or a parse.
FormatBuilt byWhat it holdsRead outside its own program
MBOXUnix mail toolsMessages only, one folder per fileWidely, since it is plain text
PSTMicrosoftMail, contacts, calendar, tasks, notesYes. The structure is published
OSTMicrosoftThe same, as a cache of a server mailboxOnly with effort. Never by Outlook itself
OLMMicrosoft, Mac onlyMail, contacts, calendar, notesYes. It is a ZIP of XML
EDBMicrosoftEvery mailbox on an Exchange serverRarely. Never casually
DBXMicrosoftOne Outlook Express folder per fileOnly through dedicated tools now

MBOX

An MBOX is a plain text file holding many messages one after another, divided by a separator line rather than by any index. It is the oldest format on this page and the least structured, which is both why almost anything can read it and why it has so many quirks. It is also the one most people now hold without knowing, because a Gmail export through Google Takeout arrives as MBOX. There is a full explanation of MBOX and its four variants if you are holding one.

PST And OST

A PST is Outlook's own container on Windows, short for Personal Storage Table, holding mail alongside contacts, calendar, tasks and notes. It predates Outlook itself, having arrived with Microsoft Exchange Client and Windows Messaging. Despite being a Microsoft format it is not a closed one, since Microsoft publishes the structure and licenses it, which is why software other than Outlook can read a PST at all. There is a fuller account of what a PST actually stores if you are holding one.

Two kinds of PST exist. The older ANSI variant stops at two gigabytes and corrupts as it approaches that ceiling. The Unicode variant that replaced it runs far larger and handles non Latin characters properly. A PST from the early 2000s is likely the first kind, which matters before you try to add anything to it.

An OST is a local cache of a mailbox that lives on a server, built the same way as a PST but bound to the profile that created it. That binding is why copying one achieves nothing. Outlook writes one whenever Cached Exchange Mode is on, which today covers Microsoft 365 and Outlook.com accounts as well as on premises Exchange. Copy an OST to another machine and Outlook there will not touch it, because the profile it belongs to does not exist. That single design decision is behind most of the difficulty people have with OST files.

OLM

OLM is what Outlook for Mac writes when you export an archive. Underneath, per the Archive Team format wiki, it is a ZIP container holding XML and content folders. That makes it far more inspectable than its Windows counterpart.

OLM is an export format, not a storage format. Outlook for Mac keeps its working data in its own database and only produces an OLM when you ask it to. Two things follow. Outlook on Windows has never been able to import one. Microsoft has confirmed that the new Outlook for Mac does not import them either. An OLM in hand is an archive that needs converting before anything can use it.

EDB

An EDB is an Exchange mailbox database, a server side store built on the Extensible Storage Engine rather than a file belonging to any one person. Microsoft describes a mailbox database as the unit mailboxes are created and stored in. Each one of those databases is a single EDB file. A server runs several of them, so an EDB holds many mailboxes without holding all of them.

People meet one when a server is decommissioned and a database is the only surviving copy, which is a recovery job rather than a file you open. On Exchange 2003 and earlier the EDB was paired with an STM file holding native internet content. The two only make sense together. If you have inherited an EDB from that era without its STM, half the mail is missing before you start.

DBX

DBX belongs to Outlook Express, which shipped with Windows for years and has been gone for many more. Each mail folder was one DBX file. The structure was never published, so reading one today means a tool written specifically for it. These turn up in old backups and inherited machines more often than you would expect.

Where Maildir Fits

Maildir belongs on this page even though it is not a file. It is a directory of individual messages, one per file, with names that encode delivery state. It exists because MBOX has no answer for two programs writing at once. A directory of separate files does.

You will meet Maildir on mail servers and on Linux desktops rather than in a folder someone hands you. Mentally it belongs with EML, since both are one message per file. The difference is that Maildir adds a naming convention on top, so the folder itself carries information a container format would otherwise hold inside it.

Maildir

A Directory

  • One file per message
  • Three subfolders, new, cur and tmp
  • Delivery state lives in the file name
  • Two writers cannot collide
  • Deleting one message frees its space at once

MBOX

A File

  • Every message in one file
  • No nesting. A folder becomes a file and stops there
  • State lives in headers, if anywhere
  • Two writers corrupt the file
  • Space returns only on a rewrite
Both hold the same messages. The disagreement is over whether a mailbox should be one object the file system treats as a unit or many objects it can work on independently.

The practical consequence is that a Maildir cannot be attached to an email or copied as a single item. Anyone handing you one usually hands you a ZIP of it instead, which is why a mail archive that unzips into thousands of numbered files is almost always a Maildir rather than something that has gone wrong.

Formats You Will Meet Less Often

Four more turn up regularly enough in inherited archives to be worth recognising, even though none of them is anybody's first guess.

FormatWhat it isWhy it is awkward
NSFThe database behind IBM and HCL Notes and Domino, holding mail alongside whole applicationsReading one properly needs Notes tooling. Nothing on this site handles it
OFTAn Outlook template, built on the same compound file structure as MSGLooks like a message and behaves like a stationery pad
RPMSGA rights protected message, its contents encryptedOpening it needs permission from the rights service, not a converter
MBXDepends entirely on what wrote itThree unrelated programs used the extension

MBX is the ambiguous one. Published descriptions of it disagree, because Eudora used it, Outlook Express version 4 used it and a UW IMAP variant used it, all for different structures. Anyone telling you an MBX is definitely one of those has skipped a step.

Eudora's version is worth a specific warning. Wikipedia's account of the mbox family records two habits that break naive conversion. Eudora replaces the sender's address in the separator line with the constant ???@???, so the From_ line carries no real address at all. It also pulls attachments out of the message and keeps them in a separate folder beside the mailbox. Convert the MBX on its own and you get mail with every attachment missing. Nothing in the file will tell you they ever existed.

Calendar and contact files are not mail formats. ICS and VCF travel alongside mail and often sit in the same export, but each describes an event or a person rather than a message. They read as attachments in a mail archive and as standalone files everywhere else, which is why a mailbox export can produce them without them belonging to any of the families above.

Which Formats Travel And Which Do Not

Portability is the property that decides how much work a migration will be. It comes down to whether anybody outside the original vendor could write a reader.

Reads Anywhere

  • EML, a message in its transit form
  • MBOX, plain text with a separator convention
  • MHT, a MIME document a browser opens
  • PST, closed looking but publicly specified
  • OLM, a ZIP once you know it is one

Needs Something Specific

  • MSG, documented but packed with Outlook only properties
  • EMLX, tied to Apple Mail's metadata layer
  • OST, bound to the profile that created it
  • EDB, a server database rather than a file
  • DBX, undocumented and long abandoned
The left column is where mail should end up if it has to survive a change of software. The right column is where mail lives while a particular program is looking after it.

Notice that PST sits on the portable side. That surprises people, because Outlook guards it so closely in practice. The format being documented is what makes every third party PST reader possible, including the browser based ones.

What This Means When You Have to Move Mail

Every migration is the same shape. Something wrote your mail into a container. Something else now needs it in a different one. Three things decide how cleanly that goes.

  1. What the destination will accept. This is a constraint rather than a preference. Outlook takes PST. Thunderbird and Apple Mail take MBOX. A review platform usually wants individual messages. Exporting to anything else just moves the problem along.
  2. What the source format carries that the target does not. Moving from a rich container to a plain one always drops something. Find out what it drops before you start. Discover it afterwards and the original may already be gone.
  3. Whether folder structure has to survive. Single message formats have no folders, so the structure has to live in directory names instead. If it matters, check it on the other side rather than assuming.

Once you know which format you are holding, the route is usually short. Our mail converters cover the direct paths between these formats. Every one of them runs in the browser tab, so the mailbox never leaves the machine it is already sitting on. Where the job is reading rather than moving, the viewers take the file as it stands and no conversion happens at all.

Format structures checked against RFC 5322, the Library of Congress format registry, Microsoft Learn and the Archive Team file format wiki in August 2026.

Questions People Ask

8 questions, answered in full below.

Which email file format is the most portable?

EML, by a wide margin. It is a message saved exactly as it travelled, with no wrapper and no vendor extension, so almost every mail program on every platform reads one. The trade off is volume. A mailbox of forty thousand messages becomes forty thousand files.

Can I just rename a file to change its format?

No. The extension is a label the operating system reads. It has no effect on the bytes underneath. Renaming a PST to MBOX gives you a PST with a misleading name. The program you hand it to will then fail in a more confusing way than if you had left it alone.

Why does my mail program use a format nothing else can read?

Usually because the program stores more than the message. Read state, categories, reminders, calendar links and search indexes have no place in a plain message file, so a client that offers those features needs a container of its own to keep them in.

Is one format safer than another for long term storage?

Openly documented formats age better. If the specification is published, someone can write a reader in twenty years even if the original vendor is long gone. That points at EML and MBOX rather than at any format whose structure was never written down.

I have an MBX file, which program made it?

There is no single answer, which is the honest response rather than a dodge. Eudora used the extension. So did Outlook Express version 4 and so did a UW IMAP variant, each for a different structure. Check what created it before converting. If it came from Eudora, look for an attachments folder sitting beside it.

Why did I receive a file called winmail.dat?

Because the sender used Outlook in Rich Text Format and your mail client does not understand TNEF. The real attachments are inside that file rather than missing. The permanent fix sits with the sender, who needs to send as HTML or plain text instead.

What is the difference between an email format and a mail protocol?

A format describes how a message sits on disk. A protocol describes how it moves between machines. IMAP, POP3 and SMTP are protocols. MBOX, PST and EML are formats. A mailbox can use any protocol and still be stored in any format, which is why the two are so often confused.

Which format should I pick when exporting mail?

Match the destination rather than your preference. If the mail is going into Outlook, it has to arrive as PST. If it is going into Thunderbird or Apple Mail, MBOX. If it is going into a court bundle or a document review platform, individual EML or PDF files. Exporting to a format the destination cannot read simply moves the problem.

Sources

Where the figures and behaviour described above were checked.

  1. Internet Message Format IETF, RFC 5322, October 2008
  2. Apple Mail Email Format, sustainability of digital formats Library of Congress
  3. Outlook for Mac Data File Just Solve the File Format Problem, Archive Team
  4. Personal Storage Table Wikipedia
  5. How to retain the file structure of an Outlook for Mac email archive Microsoft Q and A, July 2025
  6. Manage mailbox databases in Exchange Server Microsoft Learn
  7. Compound File Binary Format Wikipedia
  8. MSG file format, Open Specifications Microsoft Learn
  9. Mbox, on client specific variations Wikipedia