viewhack

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

What it cannot do

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 Mail or ImapMail folder (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 called mbox inside 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 writes From 1712…@xxx, Thunderbird From - ). 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.