An MBOX file holds a whole mailbox, often thousands of emails, in a single file. You probably have one because you downloaded your Gmail with Google Takeout, backed up Thunderbird, exported a mailbox from Apple Mail, or received an archive from an IT department or email host. This guide explains what's inside, then walks through every practical way to open one on Windows, Mac and Linux.
What is an MBOX file?
MBOX is one of the oldest email storage formats, and still one of the most common. Messages are stored one after another in a single text file. Each message begins with a separator line that starts with From (the word "From" and a space), followed by the normal headers and body of the email. Attachments are included as encoded text.
There are a few variants (mboxo, mboxrd, mboxcl and mboxcl2) that differ in how they protect lines inside a message that also begin with "From ". Good readers handle all of them. You don't need to know which one you have.
Common sources:
- Google Takeout exports Gmail as
All mail Including Spam and Trash.mbox, with each message's labels in anX-Gmail-Labelsheader. See our Google Takeout MBOX guide. - Thunderbird stores each folder as an MBOX file with no extension. See the Thunderbird MBOX guide.
- Apple Mail exports mailboxes as
.mboxpackages: folders that contain a file namedmbox. - Mail servers and hosts often provide MBOX exports for account migrations and legal holds.
Option 1: open it in a browser viewer (all platforms)
If your goal is to read, search or pull out some messages, the fastest route is the MBOX viewer. Nothing is imported or uploaded; the file is read on your computer.
Because the file is read in small slices, size isn't a problem. The list fills in as indexing runs, Gmail labels appear as folders, and conversations are grouped. On a Mac, see the MBOX viewer for Mac page for tips on Apple Mail packages and Safari.
Option 2: import into Thunderbird (Windows, Mac, Linux)
Thunderbird is free and uses MBOX internally, so it's the natural home for an MBOX file you want to keep in a mail client. There are two ways to get the file in.
With the ImportExportTools NG add-on
- In Thunderbird, open Tools → Add-ons and Themes (press Alt if the menu bar is hidden), search for ImportExportTools NG and add it.
- In the folder pane, right-click Local Folders (or another folder that should contain the import).
- Choose ImportExportTools NG → Import mbox file.
- Pick the import option you want, for example importing the file as a new folder, then select your MBOX file.
The add-on copies the messages into a new Thunderbird folder. Large files take a while.
By copying the file into your profile
- In Thunderbird, open Help → Troubleshooting Information and click Open Folder next to Profile Folder.
- Quit Thunderbird completely.
- Open the
Mail/Local Foldersfolder inside the profile. - Copy your MBOX file there and remove any
.mboxextension, so it's named, for example,Archive2019. - Start Thunderbird. The file appears as a folder under Local Folders, and Thunderbird builds its index.
Option 3: import into Apple Mail (Mac)
- In Mail, choose File → Import Mailboxes.
- Select Files in mbox format and click Continue. If the file came from Apple Mail's own Export Mailbox, choose Apple Mail instead.
- Select the MBOX file or the folder containing it, and click Choose.
- Mail creates a mailbox called Import under On My Mac in the sidebar. Move the messages wherever you like.
If the file ends in .mbox.gz, double-click it in Finder to uncompress it first. Gmail labels aren't carried over; everything lands in one mailbox.
Option 4: Outlook (not supported directly)
Outlook can't open or import MBOX files, on Windows or Mac. Your options are to read the file in a viewer, convert specific messages to EML or PDF, or use a commercial MBOX-to-PST converter. If you only need a few emails in Outlook, export them as EML from the viewer and open them in new Outlook, which supports EML files with any account.
Option 5: for technical users
On Linux and macOS, terminal mail clients such as mutt and neomutt open MBOX files directly: mutt -f archive.mbox. Python's standard library includes a mailbox module that can read MBOX files for scripts and analysis.
Which method should you use?
| You want to… | Best option |
|---|---|
| Read or search an archive quickly | Browser MBOX viewer |
| Keep the mail permanently in a mail app | Thunderbird or Apple Mail import |
| Browse Gmail labels as folders | Browser MBOX viewer (Takeout labels are kept) |
| Hand emails to someone as documents | MBOX to PDF |
| Get a list of all messages in a spreadsheet | MBOX to CSV |
| Move the mail into Outlook | Third-party MBOX-to-PST converter |
Troubleshooting
"This file isn't a valid mailbox." Check that it's really MBOX. Open the first few lines in a text editor: a valid file starts with a line like From someone@example.com Mon Jan 01 00:00:00 2024. A .zip from Takeout needs unpacking, or drop the zip into InboxVue, which opens it directly.
Apple Mail says no mailboxes were found. Choose the right import option (Apple Mail for Apple Mail exports, Files in mbox format for others), and uncompress .gz files first.
Thunderbird shows the folder but it's empty. Thunderbird may have kept a stale index. Quit Thunderbird, delete the .msf file with the same name as your MBOX file (not the MBOX itself), and restart.
The import is very slow. Large imports into mail clients copy every message. If you only need to look things up, a viewer avoids the import entirely.
The file ends abruptly. The download or copy was interrupted. Everything up to the last complete message can still be read; download the file again for the rest.
Some messages have strange characters. Old archives mix character sets. In InboxVue, change the encoding per message with ⋯ → Text encoding.
Summary
MBOX is a simple, open format, so you have options. For reading and searching, a browser viewer is fastest and keeps your mail apps clean. For a permanent home, import into Thunderbird or Apple Mail. For documents or a spreadsheet, convert to PDF or CSV.