◈ Mail → Excel

Export Gmail emails to Excel

By the Mail → Excel team · Updated 2026-10-18

Three methods, from “no setup” to “set once and forget”. Each has a real limitation — here is which one fits your case.

Method 1 — Google Takeout (no setup, not a spreadsheet)

Takeout gives you a full archive as MBOX files. It is the safest way to get all mail out of Google, but it is not Excel: you get one big file per label and then need a parser.

  1. Open takeout.google.com, select Mail only.
  2. Choose “Export once”, download the ZIP (can take hours for large mailboxes).
  3. Convert MBOX to CSV with a script or a converter — this is where most people get stuck.

Best for: full backup, legal hold, migration. Worst for: “I need a table of senders and dates today”.

Method 2 — IMAP + app password (repeatable)

Gmail supports IMAP, but not with your normal password: you need an app password (requires 2-step verification) — or OAuth for Workspace accounts.

  1. Google Account → Security → 2-Step Verification → App passwords.
  2. Create a password for “Mail”, copy the 16-character code.
  3. Use it with imap.gmail.com, port 993, SSL.
import imaplib, email

imap = imaplib.IMAP4_SSL("imap.gmail.com")
imap.login("you@gmail.com", "your-16-char-app-password")
imap.select("INBOX", readonly=True)

status, data = imap.search(None, '(SINCE 01-Sep-2026)')
for num in data[0].split()[:50]:
    status, msg_data = imap.fetch(num, "(RFC822)")
    msg = email.message_from_bytes(msg_data[0][1])
    print(msg["Date"], msg["From"], msg["Subject"])

This is the method that scales: you control which folders, which date range and which fields you get.

Method 3 — ready script (no coding)

If you do not want to write code, use a prepared Python script that already handles folders, date filters, text decoding and Excel output. It runs locally — mail never goes to a third-party server.

Get the script — $3 in USDT · what exactly is inside

Gmail-specific limits worth knowing

If you only need a list of senders and subjects, IMAP with a date filter takes about 15 minutes. If you need attachments saved, allow another 20 minutes for the script to run.

FAQ

Can I export Gmail to Excel for free?

Yes. Google Takeout is free but gives MBOX archives, not spreadsheets. IMAP with an app password is also free if you write or use a script.

Why does my Gmail password not work with IMAP?

Google blocks normal passwords for IMAP. You need an app password, which requires 2-step verification, or OAuth for Workspace accounts.

Does this work for Google Workspace?

Yes, but the admin may disable app passwords. In that case use OAuth, or export via Takeout and parse the MBOX file.

How long does exporting 10,000 emails take?

IMAP fetch is roughly 3–10 messages per second, so about 20–50 minutes. Takeout may take hours because it archives everything.

Related guides