How to Extract Attachments from an MBOX File

Get the photos, PDFs, and documents out of a Gmail Takeout or Thunderbird mailbox file in your browser, without a mail client.

3 min read


MBOX attachments extractor showing eight attachments from a mailbox export, grouped into folders by email subject
MBOX attachments extractor showing eight attachments from a mailbox export, grouped into folders by email subject

To get the attachments out of an MBOX file, drop the file onto the MBOX attachments extractor. You get a list of every attachment from every email, grouped by email. Click the download icon next to a file, or click "Download all as ZIP" to get everything at once. The file is read in your browser and is never uploaded.

An MBOX file is one big text file that contains a whole mailbox. Every email is inside, together with its attachments. But no normal program opens it as a folder of files. The extractor does.

How to extract the attachments

  1. Find your .mbox file. The next section shows where it is.
  2. Drop the file onto the extractor.
  3. Wait for the list of attachments.
  4. Download single files with the icon next to each one, or all of them with "Download all as ZIP".

Where to find the MBOX file

  • Google Takeout gives you Gmail as one .mbox file. It is usually called "All mail Including Spam and Trash.mbox".
  • Thunderbird keeps each mail folder as a file without an extension, such as Inbox or Sent, inside your Thunderbird profile folder. Skip the .msf files next to them.

The file picker may hide the Thunderbird files, because they have no extension. Drag the file onto the extractor instead. Dragging works with any file.

How the files are organized

Each email with attachments gets a folder. The folder name is the position of the email in the mailbox plus its subject, for example 0003 - Photos from the weekend hike. Emails without attachments are skipped, so there are gaps in the numbers. If two files in one email have the same name, the second one is called name (2).ext.

The ZIP file has the same folders. After unzipping, you still see which email each file came from.

Extra files and how to filter them

Every file inside an email counts as an attachment. This includes files that nobody added on purpose: logos from email signatures, images pasted into the email text, and calendar invitations. They appear next to the real attachments.

Use the Filter box to find what you need. Type .pdf to see only PDF files. Type a word from a subject line to see only the files from that email.

Very large mailboxes

The whole file must fit into your browser's memory. A full Gmail export can be several gigabytes. Firefox has been tested with files up to 1 GB. For a bigger export, go back to Google Takeout and export only the labels you need.

The extracted files add up to less than the size of the MBOX file. This is normal.

After unzipping, you have one folder per email and one file per attachment. This is usually all you wanted from the export.

Ready to try it yourself?


Извлечение вложений из Mbox

Извлекайте вложения из файлов почтовых ящиков MBOX и скачивайте их по отдельности или в виде ZIP-архива.

Open tool

Поделиться