# Gmail Takeout mbox → CSV / JSON

Turn a Google Takeout Gmail .mbox export into CSV or JSON — one row per message with date, from/to/cc, subject and Gmail labels. In-browser, no upload.

## Run it

- **CLI:** `gizza tool gmail-takeout-parser "From 1521178313854490905@xxx Mon Sep 03 10:00:00 +0000 2018
X-Gmail-Labels: Inbox,Important,Work
From: Alice Example <alice@example.com>
To: Bob <bob@example.org>
Subject: Project kickoff
Date: Mon, 3 Sep 2018 10:00:00 +0000

Hi Bob, let's start the project on Monday."`
- **Web:** https://gizza.ai/tools/gmail-takeout-parser/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/gmail-takeout-parser/tool.json

## Inputs

- `input` — Gmail Takeout .mbox contents _(field)_
- `format` — Output format _(field)_
- `include_body` — Include a body snippet column _(field)_
- `snippet_chars` — Snippet length (characters, 0 = full body) _(field)_

## Output

- Message table (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `input` — Gmail Takeout .mbox contents
- `format` — Output format
- `include_body` — Include a body snippet column
- `snippet_chars` — Snippet length (characters, 0 = full body)

Example: `https://gizza.ai/tools/gmail-takeout-parser/?input=From%201521178313854490905%40xxx%20Mon%20Sep%2003%2010%3A00%3A00%20%2B0000%202018%0AX-Gmail-Labels%3A%20Inbox%2CImportant%2CWork%0AFrom%3A%20Alice%20Example%20%3Calice%40example.com%3E%0ATo%3A%20Bob%20%3Cbob%40example.org%3E%0ASubject%3A%20Project%20kickoff%0ADate%3A%20Mon%2C%203%20Sep%202018%2010%3A00%3A00%20%2B0000%0A%0AHi%20Bob%2C%20let%27s%20start%20the%20project%20on%20Monday.&format=csv&include_body=true&snippet_chars=200`

---

## About this tool

Google Takeout hands you your Gmail as one big **`.mbox`** file — thousands of
raw email messages stacked in a single text blob. That's great for backups and
terrible for actually *reading* your mail history. This tool turns that export
into a clean table you can open in a spreadsheet: **one row per message**, with a
standardized date, the **from / to / cc** addresses, the subject, the **Gmail
labels** each message carried, and its message-id.

Paste the contents of an `.mbox` file (or even a single message), pick **CSV**
or **JSON**, and you get the table back instantly. CSV opens straight in Excel,
Numbers or Google Sheets; JSON is ready for a script or automation. Turn on
**Include a body snippet column** to add a short plain-text preview of each
message, and use the **snippet length** slider to decide how much of the body to
keep (set it to `0` for the full body).

Everything runs **in your browser** — your mail is parsed locally with a
pure-Rust email parser and never uploaded anywhere. The Gmail **labels** are read
from the `X-Gmail-Labels` header that Takeout writes, so the folder/label
structure you set up in Gmail survives the export.

## FAQ

<details>
<summary>Where do I get the .mbox file?</summary>

Go to **Google Takeout** (takeout.google.com), select **Mail**, and export. You
get a `.zip` containing one `.mbox` file (often named `All mail Including Spam
and Trash.mbox`). Open it in a text editor and paste its contents here — or paste
just the portion you want to convert.

</details>

<details>
<summary>Are the Gmail labels kept?</summary>

Yes — that's the point. Takeout records each message's labels in an
`X-Gmail-Labels` header, and this tool reads it into a **`labels`** column. A
message tagged `Inbox`, `Important` and `Work` shows all three, comma-separated,
in that column.

</details>

<details>
<summary>What columns does the table have?</summary>

`date` (standardized to ISO-8601 / RFC 3339), `from`, `to`, `cc`, `subject`,
`labels`, and `message_id`. If you enable the body snippet, a `snippet` column is
added at the end. CSV output is RFC-4180 quoted, so fields containing commas —
like a multi-label list — are safely wrapped in quotes.

</details>

<details>
<summary>Is my email uploaded anywhere?</summary>

No. Parsing happens entirely in your browser with WebAssembly. Nothing is sent
to a server, so even a private mailbox stays on your machine.

</details>

<details>
<summary>Can it handle my whole multi-gigabyte archive?</summary>

This tool takes **pasted** text, so it's best for a mailbox — or a slice of one —
that fits comfortably in browser memory. A full multi-GB Takeout archive is too
large to paste; split it or convert the parts you need. Attachment *files* aren't
extracted either — this is a message **table** tool.

</details>

## Related tools

- [Extract Action Items from Meeting Notes](https://gizza.ai/tools/action-item-extractor/): Extract action items, owners, and decisions from meeting notes or daily notes with deterministic rules. Markdown checklist or JSON, private in-browser.
- [Base Decoder](https://gizza.ai/tools/base-decoder/): Auto-detect and decode Base16, Base32, Base45, Base58, Base64, and Base85 text, including nested layers, locally in your browser.
- [cURL Command Parser](https://gizza.ai/tools/curl-command-parser/): Paste a curl command to see its method, URL, query params, headers, body, auth, cookies and flags — or rebuild clean curl. Browser-only.
- [Data Format Converter](https://gizza.ai/tools/data-format-converter/): Convert data between CSV, TSV, JSON, and NDJSON (JSONL) in any direction — auto-detects the source, infers types, unions keys. Free, in-browser, no upload.
- [Dotenv Manager](https://gizza.ai/tools/dotenv-manager/): Parse, validate, merge and secret-mask .env files in your browser: flag duplicate and missing keys, lint names, and export .env.example or JSON. No upload.
