MBOX viewer: search and read a mailbox export
Open the .mbox from Google Takeout, Thunderbird or Apple Mail without installing a mail program. Every message is listed with its date in your time zone, sender, recipients, subject, size, attachments and Gmail labels. Search and sort them, then open any one to read it with its attachments, or save it as an .eml.
The mailbox is read on your device, in slices, so a 10 GB Takeout file works. It is never uploaded, and nothing in it is loaded from the internet.
What it shows
- Every message in one list. Date and time converted to your own time zone, sender, recipients, subject, size and the number of attachments. Encoded subjects and names such as
=?UTF-8?B?…?=are decoded. Newest first, or sort by oldest, sender, size or the order in the file. - Gmail labels. A Takeout export is one file for all of your mail; each message carries an
X-Gmail-Labelsheader (Inbox, Sent, Important, your own labels, Category Promotions…). They are shown on each message and a label filter picks one of them out, so “only my Sent mail from 2019” is two clicks. - Search. Typing searches sender, recipients and subject of every message at once. “Search message bodies too” then reads each message's text, decoding base64 and quoted-printable, so a word inside an HTML newsletter or a forwarded thread is found. Bodies of messages you have already opened are searched straight away.
- Any message, opened. It is read back from the file by its position and shown by the same code as the .eml viewer: the HTML in a sandboxed frame with scripts removed and every remote image and stylesheet blocked, the plain text, each attachment as a download, the delivery path and the SPF, DKIM and DMARC results.
- Save one message as .eml, which any mail program opens, or the whole list (or just the matches) as CSV for a spreadsheet: number, date in UTC, from, to, cc, subject, size, attachments, labels and Message-ID.
- Totals. Number of messages, the date range, the total size and the ten most frequent senders; clicking a sender lists their messages.
What it cannot do
- Send, reply or forward. This is a reader. To answer a message, save it as .eml and open it in a mail program.
- Change the mailbox. Nothing is deleted, moved or re-labelled, and the file on your disk is never written to. To make a smaller mailbox, filter the list and save the messages you want one by one.
- Load remote images. There is no button for it, on purpose: a remote image in a newsletter is usually a tracking pixel that would tell the sender you opened it, even years later.
- Search huge bodies without asking. The first pass reads only the headers of each message. Bodies are searched when you press the button, and a single message over 25 MB (a large attachment) is skipped by that search and counted in the result; opening it still works.
- Count attachments perfectly in the list. The number in the list comes from the MIME part headers seen while indexing. An e-mail forwarded as an attachment can make it count the inner message's files too. The opened message lists exactly what it carries.
- Other mailbox formats. Outlook .pst and .ost, Maildir folders (one file per message) and Apple Mail's .emlx files are not .mbox. A single message opens in the .eml or Outlook .msg viewer. Old Solaris “mboxcl2” files, which count bytes with a Content-Length header instead of escaping body lines, are read by their separator lines like any other mbox.
- Very large mailboxes on a phone. The file is never loaded whole, but the page keeps a small entry for every message: about 1 KB each, so 200,000 messages take roughly 200 MB, fine on a laptop and heavy for an older phone.
Getting an .mbox
- Gmail (Google Takeout)
- takeout.google.com, “Deselect all”, tick Mail (you can limit it to some labels), then “Next step” and “Create export”. Google e-mails a link, often hours later for a large account. The .zip or .tgz holds
Takeout/Mail/All mail Including Spam and Trash.mbox: unzip it and drop that file here. - Thunderbird
- Each folder is already an mbox file with no extension, in your profile's
MailorImapMailfolder (Help › Troubleshooting Information › Profile Folder). “Inbox” (not “Inbox.msf”, which is only an index) is the one to drop. - Apple Mail
- Mailbox › Export Mailbox… writes a folder named like
Inbox.mbox; on a Mac that folder looks like a single file. The messages are in the file calledmboxinside it (right-click › Show Package Contents). - Others
- Programs built on Thunderbird (SeaMonkey, Postbox, Betterbird) keep the same mbox folder files. On Linux and macOS, mutt and alpine read and write mbox, and the Unix mail spool (
/var/mail/you) is one too.
Useful to know about mbox files
- How messages are separated
- An mbox is plain text: messages one after another, each starting with a line like
From ann@example.com Mon Jun 01 10:00:00 2009(Gmail writesFrom 1712…@xxx, ThunderbirdFrom -). That line is not part of the message, and saving a message as .eml leaves it out. - Why some lines start with “>From”
- A line in a message body that begins with “From ” would look like the start of a new message, so the program writing the mailbox puts a “>” in front of it. This page takes one “>” off such lines when it reads a message (the “mboxrd” rule, which also restores older “mboxo” files), and only treats a line as a separator when it has a date on it, so an unescaped “From the desk of…” stays in its message.
- Why Takeout's file is so big
- Attachments are stored as base64 text, about 37 % larger than the files themselves, and the export includes Spam and Trash. A 15 GB Google account often becomes a 10–20 GB .mbox. This page reads it in 4 MB slices in a background thread, at roughly the speed of your disk.
- Time zones
- The list shows each message's Date header converted to your time zone, so mail from abroad sorts in the order you received it. The sender's own clock is shown when you open the message. A message with no Date header uses the date on its separator line, which is in UTC.