google takeoutgmail analysisinbox cleanup

How to Use Google Takeout to Analyze and Declutter Your Inbox

7 min read

How to Use Google Takeout to Analyze and Declutter Your Inbox

If you want to know who is actually filling your Gmail, there are two ways to find out. One is to export everything with Google Takeout and count senders in the resulting file. The other is to let a tool ask Gmail directly. This guide covers the Takeout route in full, including the parts that surprise people, and then explains when the faster route makes more sense.

Takeout is worth knowing regardless. It is the only way to get a complete local copy of your email, and a copy is a sensible thing to have before you delete thousands of messages.

Step 1: Export your mail with Google Takeout

  1. Go to takeout.google.com and sign in.
  2. Click Deselect all. Takeout defaults to exporting every Google product, which makes the archive far bigger than you need.
  3. Check Mail only.
  4. Click All Mail data included and leave everything selected unless you want just certain labels. Keep Include all messages in MBOX format.
  5. Click Next step. Choose Export once.
  6. Set the archive size to the largest option, 50GB. Smaller sizes split your mailbox across several files, which makes the next steps harder.
  7. Click Create export.

Google emails you when the archive is ready. For a small account that can be under an hour. For an account with years of mail and attachments, Google's own estimate is "hours or possibly days," and it is not unusual for a 20GB mailbox to take most of a day. Start it in the evening and check the next morning.

Step 2: Download and extract

The download link expires after seven days, so do not leave it. A large export arrives as a compressed archive that is somewhat smaller than your mailbox, and expands to roughly the size of your mail once extracted, so make sure you have the disk space.

After extracting, open the Takeout/Mail folder. The file you want is:

All mail Including Spam and Trash.mbox

That single file holds every message, in MBOX format, which is plain text with each email one after another. It opens in a text editor in theory. In practice, a multi-gigabyte text file will stall most editors, so do not double-click it.

Step 3: Find your biggest senders

This is the actual goal: a ranked list of who sends you the most. Three ways, from least to most technical.

Option A: ChatGPT (works for small inboxes or samples)

ChatGPT accepts uploads up to 512MB per file. Most full Gmail exports are larger than that, so this only works if your inbox is small, or if you split the file and analyze a sample.

If your MBOX fits, upload it and use a prompt like:

This is a Gmail MBOX export. List the 30 most frequent senders by email
address with their message counts, flag which look like newsletters or
automated notifications, and note any senders whose messages appear to
carry large attachments.

If it does not fit, split it first (Option B shows how) and run the prompt on one chunk. You will get a partial picture, which is often enough to spot the top ten offenders.

Option B: a one-line count (works for any size)

Every message in an MBOX file has a line starting with From:. Counting those lines by address gives you the sender ranking directly, with no size limit. On a Mac or Linux terminal:

grep -h "^From: " "All mail Including Spam and Trash.mbox" | sort | uniq -c | sort -rn | head -50

On Windows, the same idea works in PowerShell:

Select-String -Path "All mail Including Spam and Trash.mbox" -Pattern "^From: " | ForEach-Object { $_.Line } | Group-Object | Sort-Object Count -Descending | Select-Object -First 50 Count, Name

To split the file into 500MB pieces for Option A: split -b 500m "All mail Including Spam and Trash.mbox" chunk_

Option C: a mail client

Thunderbird can import an MBOX file (via the ImportExportTools NG add-on) and then sort by sender. It is slow to import a big mailbox, but once loaded you get a normal mail interface for browsing what you found.

Step 4: Act on what you found

Takeout gives you the list. Acting on it happens back in Gmail:

  1. Unsubscribe from the newsletters and notifications you never open. Gmail shows an Unsubscribe link next to the sender name on most of them. See how to unsubscribe from emails in Gmail.
  2. Delete the backlog by sender. Search from: and the address, click the select-all checkbox, click Select all conversations that match this search, delete. See how to delete all emails from one sender.
  3. Filter or block the senders you never want again. Settings, Filters and Blocked Addresses, Create a new filter.
  4. Empty Trash. Deleted mail keeps counting against your storage until you do.

What the Takeout route really costs

Adding it up for a typical large inbox:

  • Waiting for Google to build the export: several hours to a day
  • Downloading and extracting a multi-gigabyte archive: 30 to 60 minutes
  • Getting a sender ranking out of the file: a few minutes with the one-liner, an hour or more with ChatGPT and splitting
  • Going back to Gmail to search and delete each sender by hand: an hour or two

It works. It is also a lot of ceremony to answer one question, and the export is stale the moment it finishes, so you cannot easily repeat it next month.

The faster route

MailMop answers the same question without the export. It connects to Gmail through Google's API, analyzes the inbox in your browser, and lists every sender ranked by email count, with the date of their last email. A 25,000-email inbox takes about ten minutes, and results appear as it goes. From that list you delete, delete with exceptions, unsubscribe, block, mark as read, or label a whole sender in one click.

Nothing is downloaded and nothing is uploaded. Your email is processed in the browser tab and never stored on a server. The code is open source and the app passed Google's CASA security assessment. The analysis is free.

Google TakeoutMailMop
Wait for exportHours to a dayNone
DownloadMulti-gigabyte archiveNone
Sender rankingScript or ChatGPTBuilt in
Act on resultsBack in Gmail, one sender at a timeFrom the same list, in bulk
RepeatableStart over each timeRe-run any time

When Takeout is still the right tool

  • You want a backup. Before a large cleanup, a Takeout export is the only complete local copy. Do it, then clean.
  • You need mail you already deleted. Takeout includes Trash at export time, but nothing older than 30 days in Trash. If it is gone from Gmail, it is gone from Takeout too.
  • You are leaving Gmail. MBOX imports into most other mail systems.
  • You want to study the data. For research on your own email patterns, the raw file is the right input.

For the everyday question of who is cluttering your inbox and what to do about it, run the analysis in the browser, keep Takeout for the backup, and spend the saved afternoon on something else.

Frequently asked questions

How do I export my Gmail data with Google Takeout?

Go to takeout.google.com, click Deselect all, then check only Mail so you do not export your whole Google account. Choose Include all messages in MBOX format, select Export once, and set the archive size to the largest option (50GB) so the export is not split into many files. Google emails you a download link when it is ready, which can take hours or days for a large inbox.

Can I analyze my Gmail MBOX file with ChatGPT?

Only in pieces. ChatGPT accepts files up to 512MB, and a Gmail MBOX export is often several gigabytes, so you have to split it into chunks and analyze each one separately. It works for a small inbox or a sample. For a full inbox, a short script that counts the From: lines is more reliable, and a tool like MailMop produces the same sender ranking in minutes with no export.

Where is the MBOX file in a Google Takeout export?

After you download and extract the archive, open the Takeout/Mail folder. The file named All mail Including Spam and Trash.mbox holds your whole email history in MBOX format. If you chose a smaller archive size, the mailbox may be split across several numbered archives.

Is there a faster way to see who emails me most?

Yes. MailMop connects to Gmail through Google's API and analyzes the inbox in your browser, listing every sender ranked by email count in about ten minutes for a 25,000-email inbox. There is nothing to download or split, your email never leaves your browser, and you can delete, unsubscribe, or block from the same list. The analysis is free.

Does Google Takeout delete anything from my Gmail?

No. Takeout only creates a copy. Your Gmail account is unchanged. The export is useful as a backup before a big cleanup, because once you delete email and empty Trash there is no way to get it back.

✨ Ready to declutter?

Clean up your Gmail inbox in minutes

Stop spending hours manually organizing emails. MailMop analyzes your inbox and identifies exactly what's taking up space, so you can reclaim your productivity.

Free forever • No credit card required • 2 minutes to get started