What is an MBOX File And Why It is Just a Text File
Plain text, no index and no specification for its first thirty years. That history explains the four variants, the size on disk and why Outlook will not touch it.
An MBOX file is one plain text file with every message written into it end to end. There is no index, no database and no compression. One line, opening with From and then a space, is the only marker for where a message stops and the next one starts. Almost everything people find confusing about the format follows from that one design decision.
People usually meet an MBOX for the first time on the way out of something. Google Takeout hands you one when you download your mail. Thunderbird has been quietly storing your folders as MBOX files all along. Apple Mail writes one when you export a mailbox, though it stopped using the format for its own storage years ago. In each case the file arrives and nothing on the machine offers to open it. That is a gap in the operating system rather than a fault in the file. If you only need to read the mail, skip to the programs that open it. If you cannot find the file at all, the storage paths are further down.
The extension is optional. Plenty of MBOX files carry no extension at all, which is normal on the Unix systems the format came from. A Thunderbird folder named Inbox with no suffix is an MBOX. Renaming it to add .mbox changes nothing about the contents. If you are not certain the file is an MBOX in the first place, our guide to every email file format covers how to tell them apart.
What is Actually Inside an MBOX File
Open a small one in a text editor and the structure gives itself away at once. Headers, then a blank line, then the body, then a blank line, then the next message begins:
From support@example.net Tue Mar 18 09:14:02 2025
From: Support <support@example.net>
To: You <you@example.org>
Subject: Ticket 4821 has been closed
Date: Tue, 18 Mar 2025 09:14:02 +0000
Your ticket has been closed. Reply to reopen it.
From billing@example.net Tue Mar 18 11:02:47 2025
From: Billing <billing@example.net>
Subject: The next message begins on the line above
-
From support@example.net Tue Mar 18 09:14:02 2025SeparatorThe only thing dividing one message from the next. Not a header -
From: Support <support@example.net>HeadersOrdinary message headers, unchanged from delivery
Subject: Ticket 4821 has been closed -
a blank lineEnd of headersEverything after this is body -
Your ticket has been closed.BodyText, HTML parts and any attachments as encoded blocks -
a blank lineEnd of messageThe next separator follows
That first line is the separator, usually called the From_ line to distinguish it from the From: header underneath it. Note the difference: the separator has a space after the word, the header has a colon. RFC 4155 describes it as a line carrying the word From, a space, an address and a timestamp in the old Unix style.
Everything between one separator and the next is an ordinary internet message. Nothing is wrapped around it and nothing is stripped out. There is one exception. A body line that would itself look like a separator has to be dealt with somehow. How each variant does it is the whole story of the section below.
Why There is No Authoritative MBOX Specification
Most file formats begin with a document and get implementations afterwards. MBOX went the other way. It was in daily use on Unix systems for decades before anybody wrote it down. By the time somebody did, several incompatible versions were already in circulation.
RFC 4155 arrived in September 2005 and says as much: the format is not documented in an authoritative specification but exists as a well known output format. What the RFC does is register a media type and define one default format that compliant software must handle. It does not undo twenty years of divergence.
- Fifth Edition Unix Mid 1970s, undocumented Unix mail tools write mailboxes as concatenated text. No specification exists because none seemed necessary.
- Mid 1990s The variants get names Daniel J. Bernstein, Rahul Dhesi and others name four incompatible versions that had already diverged across Unix flavours.
- September 2005 RFC 4155 A media type is registered and one default format is defined. Existing files keep whatever variant wrote them.
The Four MBOX Variants And Why They Exist
Every variant is an answer to one problem. If a separator is any line starting with the word From and a space, what happens when somebody writes a message body that begins a line that way?
Naively, the parser sees a new message where there is none and one email splits into two. Each variant solves this differently and the solutions are not compatible with each other.
| Variant | What it does | Where you will meet it |
|---|---|---|
| mboxo | Puts a > in front of From lines in the body, but leaves lines that already start with >From alone | Early Unix. Rare now |
| mboxrd | Escapes From and >From and >>From alike, so the change can always be undone | Thunderbird and Apple Mail. The usual answer today |
| mboxcl | Adds a Content-Length header giving the message size and still escapes From lines in the body | System V Unix mail tools |
| mboxcl2 | Uses Content-Length only, with no escaping at all | A handful of Unix clients |
The distinction between the first two is the reason mboxrd won. Under mboxo, a body line that genuinely began with >From in the original message comes back with the > stripped. Nothing in the file records whether that > was yours or the mail system's. The damage is silent and permanent.
mboxo
Not reversible
- Escapes From at the start of a line
- Leaves an existing >From untouched
- Reader strips the > either way
- Original wording is lost silently
mboxrd
Reversible
- Escapes From into >From
- Escapes >From into >>From
- Reader removes exactly one >
- Original wording always survives
In practice, a file you are handed today is almost certainly mboxrd. The other three are worth knowing about mainly so that an unusual file does not look like a corrupt one.
What MBOX Does Not Store
Everything below is missing by consequence rather than by oversight. A mailbox that is a text file cannot hold any of it without stopping being a text file.
Carried Inside the File
- Every message header, unchanged
- Message bodies, text and HTML
- Attachments, as encoded text
- Threading headers, so replies still link up
- Read and flagged state, in some clients
Not in the File at All
- An index, so nothing can jump to message 4,000
- Folder structure, since one file is one folder
- Any binary storage, hence the encoding
- A way to delete one message in place
- Any protection against two writers at once
- No index. Nothing inside the file records where message 4,000 begins. Finding it means reading everything before it. Clients that need speed keep a separate index alongside, which is what Thunderbird's
.msffiles are. Those are safe to delete, since Thunderbird rebuilds one when it next opens the folder. - No folder structure. A mailbox tree becomes a directory of MBOX files and the shape of that tree lives in the directory layout rather than in any file.
- No per message deletion. Removing a message means rewriting the file, so most clients mark it instead and reclaim the space later during a compact.
- No concurrency. Two processes writing the same file will corrupt it, which is why locking conventions grew up around the format and why Maildir was invented as an alternative.
Which Programs Can Open an MBOX File
Because the format is plain text, reading one is easier than the silence on your machine suggests. What varies is whether a program understands the separator convention or just shows you the raw text.
| Program | What it does with an MBOX |
|---|---|
| Mozilla Thunderbird | Reads and writes the format natively, since its own local folders are MBOX files |
| Apple Mail | Imports one through File then Import Mailboxes and exports one the same way |
| Evolution, Claws Mail, Mutt | Read MBOX natively, which is expected on the systems the format grew up on |
| Microsoft Outlook | No MBOX support in any version. The mail has to be converted first |
| A plain text editor | Shows every header and body, though attachments appear as blocks of encoded text. Fine for a small file, not for a large one |
| Browser based viewers | Parse the file in the tab, so nothing is installed and nothing is uploaded |
If the goal is to read the mail rather than to migrate it, an online file viewer is the shortest route, because it skips the import step entirely. If the mail has to end up in Outlook, that is a conversion job rather than a viewing one, since Outlook works in PST and will not read a mailbox in this form. Our MBOX converter handles the format mapping that Outlook will not do for you.
Importing and opening are different jobs. Pointing a mail client at an MBOX usually copies every message into that client's own store, which doubles the disk usage and creates a second copy that then drifts from the first. Worth knowing before you import a large archive just to read one message.
Where MBOX Files are Stored on Your Computer
An MBOX often exists on the machine already and cannot be found, because no client announces where it writes one and none of the locations are anywhere a person would look unaided.
| Client and system | Where to look |
|---|---|
| Thunderbird on Windows | %AppData%\Thunderbird\Profiles\ then the profile folder, then Mail |
| Thunderbird on macOS | ~/Library/Thunderbird/Profiles/ then the profile folder, then Mail |
| Thunderbird on Linux | ~/.thunderbird/ then the profile folder, then Mail |
| Apple Mail on macOS | ~/Library/Mail/ holds a version folder, though modern releases store single messages rather than MBOX |
| Google Takeout | Wherever the archive was unzipped. Inside it, under Takeout then Mail |
Two things trip people up here. The Library folder on macOS is hidden by default. Holding Option while opening the Finder Go menu reveals it. On Windows, typing %AppData% into the address bar of a File Explorer window jumps straight to the right place.
Local folders only. Mail that lives on an IMAP server may be cached rather than stored, so the profile folder can look emptier than the mailbox does in the client. Anything filed under Local Folders is genuinely on the disk.
What Gmail Takeout Puts in an MBOX
Takeout is where most people meet the format now. What Google writes is not quite a plain mailbox. Two extra headers ride along on every message.
From 1829476301928374650@xxx Tue Mar 18 09:14:02 2025
X-GM-THRID: 1829476301928374650
X-Gmail-Labels: Inbox,Important,Receipts,Unread
From: Support <support@example.net>
Subject: Ticket 4821 has been closed
Both are plain headers, so nothing breaks in a client that has never heard of them. They are simply ignored.
- X-Gmail-Labels carries the labels a message had, as a comma separated list. Labels have no equivalent in the MBOX format, because a message belongs to exactly one file, so Google records them in a header instead. Almost no mail client reads this header, which is why importing a Takeout archive usually flattens years of labelling into one undifferentiated folder.
- X-GM-THRID carries the Gmail thread the message belonged to, which is separate from the standard threading headers.
Both survive in the file whether or not anything reads them, so the information is recoverable later even if the first import loses it. That matters most in legal and forensic work, where which label a message sat under is part of the record rather than a convenience.
Nobody documents which variant Takeout writes. Published descriptions disagree, some calling it mboxo and some mboxrd. It matters only if a body line in your mail begins with the word From, which is rare, so treat the archive as an escaping variant and confirm against your own file if the distinction is load bearing.
Why an MBOX File is Bigger than the Mailbox It Came From
An MBOX carries printable characters only, so every attachment is converted into printable characters before it goes in. The usual encoding turns each group of three bytes into four, which is where the growth comes from.
That is a fixed overhead of about a third, before line breaks are added.
Compressing the MBOX is worth doing before moving it anywhere. It changes nothing about the file and it puts the transfer back to roughly the size the mail actually was.
How to Check Whether Your File is Really an MBOX
Before converting anything, confirm the file is what you think it is. Three checks take a minute and rule out most surprises.
- Open it in a plain text editor. Notepad, TextEdit or anything similar. Readable headers and message bodies mean a text based mail file. Unreadable characters from the first line mean it is not an MBOX, whatever the extension claims. On a file above a few hundred megabytes, skip this step, because a text editor loads the whole thing into memory at once and will simply hang.
- Look at the first line. It should begin with the word From, a space, then an address and a date. If the file opens on a
From:header carrying a colon, you are holding a single message rather than a mailbox. - Search for Content-Length. A Content-Length header on every message points at mboxcl or mboxcl2. No Content-Length means one of the escaping variants, which in practice is mboxrd.
Once those three agree, any tool that reads MBOX will read yours, including the browser based viewers that need no import step. If the first check fails, the file is a different format wearing the wrong extension. A PST opens on the bytes !BDN while an OLM and a ZIP both open on PK. Either way the tool that matches the real format is the place to go next.
Format behaviour checked against RFC 4155 and the qmail mbox manual page in August 2026.
Questions People Ask
8 questions, answered in full below.Can I open an MBOX file in Notepad?
Yes. That is the quickest way to confirm you have one. It is plain text, so any editor will show you the headers and the message bodies. What you will not get is anything readable out of attachments, because those are encoded as long blocks of Base64 rather than stored as files.
Why is my MBOX file so much larger than the mailbox it came from?
Attachments. An MBOX has no way to store binary data, so every attachment is encoded into printable characters before it goes in. That encoding turns three bytes into four, which adds roughly a third to the size of every attached file.
Is MBOX the same as EML?
No, though they are close relatives. An EML file holds one message. An MBOX holds many, written one after another in the same file. Split an MBOX at every separator line and what you get is a pile of messages in EML form, which is why a tool that reads one usually reads the other.
Which MBOX variant do I have?
Almost certainly mboxrd, unless the file came off an old Unix system. Google Takeout exports, Thunderbird and Apple Mail all write it. If you want to check, look for a Content-Length header on the messages. Its presence points at one of the two Content-Length variants instead.
Why did my MBOX file not get smaller after I deleted messages?
Because deleting from an MBOX usually marks a message rather than removing its bytes. The space is reclaimed only when the client rewrites the file, an operation most of them call compacting. Until that runs, the deleted mail is still sitting in the file.
Where is my MBOX file saved?
It depends on what wrote it. A Thunderbird folder sits inside the profile directory, reachable through %AppData% on Windows or the Library folder on macOS. A Takeout archive is wherever you unzipped it. The paths are in the section above.
Why does my text editor freeze when I open an MBOX file?
Because it is loading the entire file into memory before showing you anything. A mail archive of several gigabytes is still one text file and most editors make no attempt to read it a piece at a time. Use something that streams the file rather than opening it whole.
Can Outlook open an MBOX file?
Not directly. Outlook reads PST and OST. It has never shipped an MBOX importer in any version. Two routes work. Convert the file into a format Outlook understands with an MBOX converter or read it in something that speaks both formats.
Sources
Where the figures and behaviour described above were checked.
- The application/mbox Media Type IETF, RFC 4155, September 2005
- mbox, file containing mail messages qmail manual page
- Mbox Wikipedia
- MBOX Email Format, sustainability of digital formats Library of Congress
- Common mbox Variations, Programming Internet Email O'Reilly Media