MBOX to CSV Converter

Convert Unix mbox email archives to CSV spreadsheet or JSON. Perfect for Gmail Takeout exports, Thunderbird backups, Apple Mail archives. Extracts sender, date, subject, snippet, and Gmail labels.

1.0.0
Version
Auth
Batch

About MBOX to CSV Converter

MBOX is the Unix one-file-per-mailbox format that Gmail Takeout, Thunderbird, Apple Mail and most Unix mailers all speak. The trouble is that nothing else does. Open an All Mail.mbox from a Gmail export in a text editor and you get megabytes of From -separated raw RFC 822 with MIME-encoded headers and base64 attachments. The desktop options (Thunderbird's ImportExport NG add-on, MBOX Viewer Pro) work but require an install and a multi-step click path. Online converters almost always upload, sometimes cap at small file sizes, and almost never expose the Gmail-specific X-Gmail-Labels header.

This MBOX to CSV converter walks the archive and produces both CSV (one row per message, ready for Excel) and JSON (structured for scripts) in a single pass. Per-message fields include sender, recipient, CC, date, subject, snippet, attachment count and — when the archive came from Gmail Takeout — the X-Gmail-Labels header, so the category and label structure of a Gmail account survives the conversion. Top-sender frequency is computed on the fly so you can see who actually fills your inbox without writing a pivot table. MIME-encoded headers (=?utf-8?B?...?=, =?gbk?Q?...?=, ISO-2022-JP) are decoded so subjects in non-English scripts come through in their original characters. Files up to 50 MB with up to 10,000 messages per pass.

Use it to index a Gmail Takeout archive in Excel without restoring it to a live IMAP server, audit who an old inbox actually corresponded with, search a Thunderbird archive in a spreadsheet, build a JSON dataset of historical correspondence for a research project, or just open a 2 GB All Mail.mbox without spinning up a mail client. Files are processed in a stateless serverless function and discarded immediately after the response.

MBOX to CSV Converter Use Cases

  • Indexing a Gmail Takeout archive in Excel without restoring it to a live IMAP server
  • Auditing who an old inbox corresponded with through top-sender frequency analysis
  • Researchers building a JSON dataset of historical correspondence for NLP work
  • Searching a Thunderbird or Apple Mail archive in a spreadsheet rather than re-importing
  • Legal discovery teams pulling a structured per-message table from an MBOX export
  • Migrating from one mail client to another without losing label or category structure
  • Auditing an old MBOX before deleting it to confirm no important threads are inside

MBOX to CSV Converter Features

  • Parses standard Unix MBOX with 'From '-separated message boundaries — Gmail Takeout, Thunderbird, Apple Mail, mutt, pine
  • CSV output with one row per message — sender, recipients, CC, date, subject, snippet, attachment count, Gmail labels
  • JSON output with the same fields plus structured per-message metadata for downstream scripts
  • Decodes MIME-encoded headers (=?utf-8?B?...?=, =?gbk?Q?...?=, ISO-2022-JP) so non-English subjects come through correctly
  • Preserves X-Gmail-Labels so Gmail's INBOX/SENT/Important/Starred and custom labels survive the conversion
  • Top-sender frequency table computed on the fly — see who fills your inbox without writing a pivot
  • Files up to 50 MB with up to 10,000 messages per pass — discarded immediately after response, nothing logged

How to Use MBOX to CSV Converter

Export your MBOX file

Gmail: visit Google Takeout, deselect everything, enable Mail, choose MBOX, download the resulting zip. Thunderbird: ImportExport NG add-on → Export All Messages in Folder. Apple Mail: Mailbox → Export Mailbox. The result is a single .mbox file.

Upload to the converter

Drag-and-drop the .mbox onto the upload zone (up to 50 MB and 10,000 messages per pass). For larger archives, split by year or by Gmail label before uploading — both Takeout and Thunderbird can export per-folder MBOX.

Click Parse

The serverless parser walks the MBOX, decodes MIME headers, extracts the standard fields and pulls the Gmail labels header if it's present. Top-sender frequency is computed in the same pass.

Review the preview and stats

The result panel shows total messages, total attachments, top senders by count and a preview of the first few rows. Confirm that subjects in non-English scripts came through in the right characters before downloading.

Download CSV or JSON

CSV opens straight in Excel, Sheets or LibreOffice with a UTF-8 BOM. JSON loads with json.load in Python or fetch().then(r=>r.json()) in JavaScript. Both contain the same fields — pick the format your downstream tool wants.

MBOX to CSV Converter FAQ

No. The MBOX is uploaded to a stateless serverless function, parsed, and deleted immediately after the response is sent. Nothing is logged to durable storage. For a privileged or evidence-grade archive, prefer a local tool — Python's mailbox module parses MBOX in a few lines and never sends bytes anywhere.

Gmail Takeout (the standard for Google account exports), Thunderbird (its native storage), Apple Mail (Mailbox → Export Mailbox), mutt and pine. Outlook does NOT export MBOX natively — it ships PST/OST, which is a different format. To convert PST, use a dedicated PST-to-MBOX tool (libpff, Aid4Mail) first, then drop the MBOX here.

Yes, if the archive came from Gmail Takeout. Gmail writes the message's labels into the X-Gmail-Labels header — INBOX, SENT, Important, Starred, custom user labels, category tags — and this parser pulls that header into the labels column. The conversion preserves the comma-separated label list, so you can filter the CSV in Excel by label as easily as in Gmail.

Split it before uploading. Gmail Takeout lets you pick specific labels or date ranges — smaller exports are easier here. Thunderbird's ImportExport NG can export per-folder. For one big archive, use mboxsplit (a small Python script that splits on 'From ' markers) to break it into 50 MB chunks. Run the chunks separately and concatenate the CSV outputs afterwards.

Only a short snippet of the body (first ~200 characters of plain text), plus the attachment count and the per-attachment filename list. The full body and attachment binary data are not embedded in the CSV — they'd blow up the file size and aren't usable in a spreadsheet anyway. For full body access, use the JSON output or parse the MBOX with mailbox.mbox locally.

Yes. MIME-encoded headers (=?utf-8?B?...?=, =?gbk?Q?...?=, ISO-2022-JP, Shift-JIS) are decoded with Python's email.header.make_header before being written to the output. Subjects, sender names and attachment filenames in non-English scripts display correctly in both CSV and JSON. The CSV uses UTF-8 BOM so Excel opens it without an encoding wizard.

Thunderbird ImportExport NG is the right tool when you have Thunderbird installed and want to script around an existing inbox. This converter is the standalone version — upload a file, get CSV and JSON, no install needed. The top-sender summary and Gmail-label preservation are also more developed than the ImportExport NG defaults, which matters when you're auditing rather than just exporting.

File size limit: 50MB. Large Gmail Takeout archives can be GB-sized. If yours is too big, split it first with split (Linux/macOS) or use a tool like mbox-splitter before uploading.

Upload your .mbox archive

Gmail Takeout, Thunderbird, Apple Mail archives • Max 50MB

Requires login • 2 credits (heavier parsing)

MBOX to CSV Converter Tutorial

What is an MBOX file?

MBOX is the classic Unix format for storing a collection of emails in a single file, where each message starts with a special From separator line. It's the native archive format for Thunderbird, Apple Mail, and the file Google gives you in Gmail Takeout exports.

Why Convert to CSV?

  • Bulk analysis: See how many emails you got from each sender
  • Backup inventory: A readable index of your entire archive
  • Filter and search: Use Excel/Sheets to find specific messages fast
  • Migrate data: Import metadata into a CRM, a database, or other tools

What Gets Extracted

For each message in the archive, the CSV includes:

  • Date — parsed to YYYY-MM-DD HH:MM:SS
  • From / To / Cc — decoded, MIME headers unwrapped
  • Subject — UTF-8 decoded
  • Snippet — first 200 chars of plain-text body
  • Attachments — count of attachments
  • Gmail Labels — preserved from X-Gmail-Labels header
  • Message-ID — for deduplication and linking

How to Get an MBOX File

  • Gmail: takeout.google.com → select Mail → Export
  • Thunderbird: Profile folder → Mail/Local Folders/ contains mbox files directly
  • Apple Mail: Mailbox → Export Mailbox... — creates .mbox bundle

Privacy

Your archive is parsed in memory, summaries returned, and the file deleted immediately after conversion. Nothing is stored.