Google Takeout cannot give you a CSV: it exports Gmail as an MBOX file, so getting to a spreadsheet takes one conversion step in the middle. This guide walks through the full route from Takeout to Google Sheets with a free script, then explains where that route stops being practical and what to use instead.
What does Google Takeout give you for Gmail?
Takeout exports your mailbox as one MBOX file, a plain-text archive that holds every selected message, and Google Sheets cannot open it directly.
Each message is stored whole, attachments included, with Gmail labels written into an X-Gmail-Labels header. Google’s own Takeout help page lists the options you get: send the link by email or save the archive to Drive, Dropbox, OneDrive or Box, pick a maximum archive size (larger exports are split into several files), and choose Zip or Tgz. Archives expire after about 7 days and each can be downloaded 5 times. Timeframe exports are not supported for Gmail, so you export a whole mailbox or chosen labels, not “last quarter”.

How do you request the Gmail export?
Open takeout.google.com, select only Mail, choose the labels you need, pick Zip, and create the export.
- Sign in at takeout.google.com with the account you want to export. If an admin restricts downloads for a Google Workspace account, ask them to allow it first.
- Click “Deselect all”, then tick Mail.
- Open “All Mail data included” and untick every label you do not need. Narrowing to the labels in scope keeps the file small and makes the later steps faster.
- Choose “Send download link via email”, “Export once”, file type .zip, and the largest archive size offered.
- Click Create export and wait for the email. Google says delivery takes anywhere from a few minutes to a few days, and most people get it the same day.
- Download from a desktop computer and unzip. The
.mboxfile sits inside the Mail folder.
How do you convert MBOX to CSV?
Run a short Python script that reads the MBOX and writes one CSV row per message, or use a desktop converter if you would rather not run code.
The script below uses only Python’s standard library, so there is nothing to install. It writes the date (converted to UTC), sender, recipient, subject, labels and the first 500 characters of the body text. Save it as mbox2csv.py:
import mailbox, csv, sys, re
from email.header import decode_header, make_header
from datetime import timezone
from email.utils import parsedate_to_datetime
def clean(v):
if not v:
return ""
try:
return str(make_header(decode_header(v)))
except Exception:
return str(v)
def text_of(part):
payload = part.get_payload(decode=True) or b""
try:
return payload.decode(part.get_content_charset or "utf-8", "replace")
except LookupError:
return payload.decode("utf-8", "replace")
def body(msg):
html = ""
for part in msg.walk:
if part.get_filename:
continue
kind = part.get_content_type
if kind == "text/plain":
return text_of(part)
if kind == "text/html" and not html:
html = text_of(part)
return re.sub("<[^>]+>", " ", html)
box = mailbox.mbox(sys.argv[1])
with open(sys.argv[2], "w", newline="", encoding="utf-8") as f:
w = csv.writer(f)
w.writerow(["date", "from", "to", "subject", "labels", "body_start"])
for m in box:
try:
dt = parsedate_to_datetime(m["Date"])
if dt.tzinfo is None:
dt = dt.replace(tzinfo=timezone.utc)
d = dt.astimezone(timezone.utc).strftime("%Y-%m-%d %H:%M:%S")
except Exception:
d = m["Date"] or ""
w.writerow([d, clean(m["From"]), clean(m["To"]), clean(m["Subject"]),
clean(m["X-Gmail-Labels"]), " ".join(body(m).split)[:500]])
Run it with python3 mbox2csv.py "All mail Including Spam and Trash.mbox" gmail.csv, using the actual file name from your Mail folder (a whole-mailbox export is usually called that, and a single label is named after the label). It reads the file one message at a time, so a large archive does not have to fit in memory. Two things to know: for messages that have only an HTML body, the script strips the tags and uses what is left, which is rough (styling text and link clutter can leak in), and attachments are ignored. Messages with an unknown character set are decoded as UTF-8 instead of stopping the run.
If you prefer an app, desktop converters exist. One Mac app, MBOX to CSV Data Extractor, is free for files under 50 MB and charges a one-time $9.99 to lift that limit, according to its own page. Check any converter’s privacy terms before you point it at a mailbox.
How do you import the CSV into Google Sheets?
Open a blank sheet, choose File, Import, Upload, and pick the CSV.
- In Google Sheets, click File > Import > Upload and drop in
gmail.csv. - Under “Import location”, choose “Replace spreadsheet” for a clean sheet or “Insert new sheet(s)” to keep other tabs.
- Set “Separator type” to Comma (or leave it on detect).
- Tick “Convert text to numbers, dates, and formulas” so the dates become real dates you can sort and filter. They are in UTC, so shift them if your audit period follows another time zone.
- Click Import data, then freeze row 1 and turn on a filter.
A spreadsheet holds at most 10 million cells, so a 100,000-message export with 6 columns (600,000 cells) fits comfortably, while a very large archive may need splitting by label or year before import.
Worked example: a one-off audit of vendor emails
Say an IT admin has to show an auditor every message from three payment vendors in a Gmail account during one quarter.
Takeout cannot filter by date, so the admin exports the label “Vendors” only, converts it with the script, imports the CSV, and then filters the date column to the quarter and the from column to the three vendor addresses. The columns the auditor needs (date, sender, subject) are already there. A quarter’s worth of messages for 3 vendors, a few hundred rows, takes minutes in Sheets once the file is in hand.
What the admin cannot get from this route are the values inside the messages: invoice numbers, amounts, order IDs. Those sit in the body text, and pulling them out means writing a pattern for every vendor’s layout in the script or in Sheets formulas.
Where does the Takeout route fall short?
It is a one-time, whole-mailbox snapshot, and it stops being practical when you need specific values, regular refreshes or fresh data.
- No date or search filter. You export whole labels, then filter afterwards.
- A wait for every export. Delivery can take from minutes to days, and the link expires after about 7 days.
- Messages, not fields. The CSV holds headers and a body snippet. Order numbers, totals and dates inside the body need extra parsing.
- Frozen in time. Next month you repeat the whole process.
- Whole-mailbox exposure. The archive contains everything in the labels you picked, including attachments, and you now have a copy of it on a laptop.
Takeout is the right tool when you need a complete archive for an audit or a backup. For a full backup, see our guide to exporting emails to Excel, CSV or Google Sheets and full backups and the Gmail email backup guide.
What is the alternative if you only need the data?
If what you want is specific fields from Gmail messages in a sheet, parse them straight from Gmail with an add-on instead of exporting the whole mailbox.
xtractor.app is a Google Workspace add-on that runs inside Google Sheets and reads emails from your Gmail account. You search by subject, sender, date and content, define which text to extract with text-before and text-after rules or regex filters, and the values land as rows and columns in your own sheet. It copes with emails whose layout varies through multiple parsing contexts, imports thousands of emails in one bulk run, and can repeat the import on a schedule. Saved searches and filters can be reused, so the quarterly vendor audit above becomes one saved search. The extracted data stays in your Google Sheet, and you can download it as CSV or Excel from there.
The limits matter for the same reason. xtractor works with Gmail only, so it does not read Outlook or IMAP mailboxes. It exports extracted values, not whole messages or MBOX archives, and it does not parse attachments such as PDFs. If you need the full archive for legal or backup reasons, Takeout is still the answer.
It is free to install. New accounts get 100 emails to try, and the free plan then allows 10 emails a day and 50 a month, without scheduling. Paid plans are priced per user from $24 a month billed monthly ($5 a month billed annually) and cover 1,000 to 100,000 imported emails a month. For a walkthrough, see Email Parser to Google Sheets: setup, bulk imports and scheduling, or the pillar guide on importing email data into Google Sheets automatically.
Takeout or an add-on: which should you pick?
Pick Takeout when you need everything in the mailbox once, and an add-on when you need particular fields now and again.
| Need | Takeout + script | Google Sheets add-on (xtractor) |
|---|---|---|
| Complete mailbox archive including attachments | Yes | No, exports extracted values only |
| Only messages from certain senders or dates | After the fact, in Sheets | Yes, search before import |
| Values from inside the email body | Extra parsing code | Filters and parsing contexts |
| Repeat on a schedule | No, repeat by hand | Yes, on paid plans |
| Works with non-Gmail mailboxes | MBOX files from any client can use the same script | No, Gmail only |
| Cost | Free (your time) | Free tier, paid plans from $24 a month billed monthly |
If you want more guides on getting email data into spreadsheets, subscribe to our newsletter and we will send new ones as they are published.
FAQ
Can Google Takeout export Gmail directly to CSV?
No. Takeout exports Gmail as an MBOX file, so you need a conversion step before Google Sheets can use it.
How do I import an MBOX file into Google Sheets?
Convert the MBOX to CSV first (the script above does this), then use File > Import > Upload in Sheets. Sheets cannot open an MBOX file itself.
Can I export only some of my Gmail through Takeout?
Yes, by label. Choose the labels in the Mail options. Date ranges are not supported, so filter by date in Sheets after import.
How long does a Takeout export take?
Google says from a few minutes to a few days. The link then stays valid for about 7 days.
Are labels kept in the export?
Yes, in an X-Gmail-Labels header on each message, which the script above writes to its own column.
Is there a limit on what Sheets can hold?
A spreadsheet is capped at 10 million cells, so very large exports may need splitting before import.