Home » Blog » MBOX File » How to Convert EML to MBOX Files With Attachments

How to Convert EML to MBOX Files With Attachments

Neeraj Kumar
Published By Neeraj Kumar
Debasish Pramanik
Approved By Debasish Pramanik
Published On
Last Updated

Thunderbird and Apple Mail create MBOX files from EML emails without extra software but both need manual steps. Four methods convert EML to MBOX with attachments and they are Thunderbird, Apple Mail, a Python script and EML to MBOX converter software. Free methods have no date filter and no export report and Apple Mail moves one email at a time. EML to MBOX converter software converts many EML and EMLX files together with their attachments and creates an export report on Windows. Check one small folder first by opening its MBOX file in Thunderbird.

Converting EML files to MBOX format consolidates thousands of .eml files into a single .mbox file. Teams save EML archives as MBOX files for email consolidation, cross platform migration and forensic eDiscovery.

Three problems appear when you save EML archives as MBOX files.

  • Missing Attachments. Emails reach your MBOX client without their files.
  • Scrambled Text Encoding. Names and message text show broken characters.
  • Broken Folder Hierarchy. Inbox and Sent Items emails mix together in one folder.

I created this guide to show why EML files move to MBOX format and how the conversion works with attachments and your folder structure. Stay tuned till the end and learn the checks that confirm your output.

Why Convert EML Files to MBOX Format?

Five reasons explain the switch for users and IT teams.

  • Fewer Files. One MBOX file per folder replaces thousands of loose EML files and speeds up storage and transfer.
  • Client Switch. Import MBOX files into Thunderbird or Apple Mail in a few clicks.
  • Legacy Migration. Windows Live Mail and Windows Mail store every email as an EML file so conversion moves those old emails to a Mac.
  • Legal and Forensic Review. Legal and forensic teams convert EML archives to MBOX files for review work and need the source folder hierarchy rebuilt.
  • Compact Backup. A single file copies quickly to an external SSD or cloud folder.

EML vs MBOX Formats at a Glance

EML saves a single email as a plain text file that follows the RFC 5322 standard. MBOX combines many emails in one plain text file and marks every message with a line that starts with From.

FeatureEMLMBOX
Emails per fileOneMany
Common sourcesThunderbird, Windows Live Mail, eM ClientThunderbird, Apple Mail, Google Takeout
AttachmentsStored inside the fileStored inside the file
Folder layoutLoose files in foldersOne file for every mailbox folder
Main useShare or archive single emailsBack up or move a mailbox

Our MBOX file format guide describes the From line and the MBOX variants. Need MBOX emails back as separate files? Convert MBOX to EML shows the steps.

What to Check Before You Convert EML Files?

Finish these checks before you convert your EML files.

  • Merge and organize. Collect all .eml files in one master folder with subfolders for Inbox, Sent Items and Drafts so your folder hierarchy remains in place.
  • Isolate empty files. Sort the folder by size in Windows Explorer or Mac Finder and move EML files that show 0 bytes out of the folder. Zero byte files contain no email.
  • Note protected files. EML files with S/MIME encryption or password protected PDF attachments move into MBOX as they are. You still need the original password to open those attachments later.
  • Back up the originals. Copy your raw EML folders to an external SSD before you start. Your source emails remain safe if an import fails.
  • Keep free disk space. Free enough space for a second copy of your data.
  • Choose the MBOX client. Decide whether Thunderbird or Apple Mail opens the MBOX file.

Thunderbird and Python create one MBOX file for the folder you choose. Use separate folders when you want separate MBOX files.

How to Export EML Emails as MBOX in Thunderbird?

Thunderbird imports EML files by drag and drop and the ImportExportTools NG extension exports a folder as one MBOX file. Thunderbird is free and works on Windows, Mac and Linux so these steps fit all three.

  1. Start Thunderbird and install ImportExportTools NG through Tools > Add-ons and Themes. Click Add to Thunderbird and restart Thunderbird.
  2. Select Local Folders and open its context menu. Choose New Folder. Name the folder and confirm.
  3. Open the folder that contains your EML files. Select all files and drag them into the new Thunderbird folder.
  4. Select the new folder and open its context menu. Choose ImportExportTools NG > Folder Export (mbox) and select As mbox File.
  5. Select a destination and click Save. Thunderbird saves the folder as one MBOX file.

Hundreds of files make dragging slow. Open the context menu of the new folder instead and choose ImportExportTools NG > Import EML Messages. Select a full directory with its subdirectories and Thunderbird adds every file in one step.

Import ten EML files first and export them. Open the exported file in a text editor to confirm that every message starts with a From line.

Menu missing after installation? Our Thunderbird ImportExportTools NG Not Working Issue guide explains the fix.

Need the EML files inside Thunderbird only? Import EML Files to Thunderbird explains the steps.

How to Save EML Emails in Apple Mail as an MBOX Package?

Apple Mail has no EML import option because File > Import Mailboxes accepts only Apple Mail and mbox files. Open every EML file in Mail instead and export the new mailbox. Use this free Mac method when you have only a few emails.

  1. Start Mail and choose Mailbox > New Mailbox. Select On My Mac as the location. Name the mailbox and click OK.
  2. Open an EML file in Finder with a double click. Mail opens the email in its own window.
  3. Choose Message > Move To and select your new mailbox. Repeat these steps for every EML file you need.
  4. Select the new mailbox in the sidebar. Choose Mailbox > Export Mailbox. Export Mailbox option in Apple Mail
  5. Choose a destination folder and click Choose. Mail saves the mailbox as an .mbox package. Choose a destination folder in Apple Mail
  6. Your .mbox package appears in the destination folder. Exported MBOX package in the destination folder

    Apple Mail has no bulk EML import. Use Thunderbird or converter software for hundreds of files.

Our Apple Mail MBOX import and export steps explain the import side.

How to Create MBOX Files From EML With Python?

Python includes a mailbox module that creates MBOX files. Save the script below as eml2mbox.py and it adds every EML file from a folder to one new MBOX file.

import mailbox
from pathlib import Path

source = Path("C:/EmlFiles")
target = mailbox.mbox("C:/EmlFiles/output.mbox")
target.lock()
try:
    for eml in sorted(source.rglob("*.eml")):
        target.add(eml.read_bytes())
    target.flush()
finally:
    target.close()
  1. Install Python 3 from the Python downloads.
  2. Copy your EML files into one folder. Subfolders count too and all emails go into one MBOX file.
  3. Paste the script into Notepad or a code editor. Edit both paths to match your folders.
  4. Open Command Prompt on Windows or Terminal on Mac. Type python eml2mbox.py and press Enter. Mac users type python3 eml2mbox.py.
  5. Open Thunderbird and go to Local Folders. Use ImportExportTools NG > Import mbox file to inspect the new MBOX file.

    Python creates MBOX files in the original mbox format. Body lines that start with From gain a > sign and every separator line shows the time of conversion. Our MBOX variants guide explains why.

How to Convert EML to MBOX With EmailDoctor Software?

Convert EML and EMLX files to MBOX files in bulk with EmailDoctor EML Converter. Outlook is not required for the conversion.

Six features help with bulk EML data.

  • Folder Mode. Add loose EML files or a full folder in one go.
  • Date Filter. Export only the emails sent between two dates.
  • Single MBOX. Merge all selected emails and folders into one MBOX file.
  • Twelve Formats. Export CSV, EML, EMLX, HTML, JSON, MBOX, MHT, MSG, PDF, PST, TXT or ZIP files.
  • No Outlook Needed. Conversion needs only Windows and Microsoft .NET Framework 4.5 or above.
  • Export Report. ExportReport.csv lists the source path, destination path, success count and failed count.

Convert Emails on Windows

  1. Open the converter after installation. Select Files appears as the first screen. Converter home screen on Windows
  2. Click Activate in the top bar when you own a license key. Choose Online Activation and enter the key. Go to the next step to use the demo. Product Activation window
  3. Select File Mode for loose EML or EMLX files. Select Folder Mode to add a folder. File Mode and Folder Mode options
  4. Click Browse Files. Dragging files into the box also works. Browse Files button for EML files
  5. Select your files in the Windows dialog. Click Open. Select EML files in the Windows dialog
  6. Check the list of files and sizes. Use Add More Files to include more or Remove All to clear the list. Click Next. List of added EML files with sizes
  7. Select Apply Date Range Filter to convert a set period. Enter a Start Date and an End Date and click Add Range. Apply Date Range Filter on the Export Filter screen
  8. Click Next. Clear the filter box to convert every email. Next button on the Export Filter screen
  9. Select MBOX in the Export Options list. Click Next. MBOX selected in the Export Options list
  10. Click Settings to open the MBOX options. Tick Create a single MBOX file for all emails and folders to merge everything. Click Next. MBOX export settings with the single file option
  11. Click Browse next to Select Destination Path. Choose a folder and click Select Folder. Browse next to Select Destination Path
  12. Click Start Export. Click OK on the success message and click View Result to open the output folder. Start Export button

Windows Explorer opens the output folder. Open the MBOX folder inside it to find your MBOX file and ExportReport.csv.

MBOX folder with the MBOX file and ExportReport.csv

Convert one small folder in the demo first. Demo mode exports 10 emails per folder, which is enough to check attachments.

Converter software works only on Windows. Mac users follow the Thunderbird or Apple Mail steps above. Then open the result with the Apple Mail MBOX import steps.

Which Method Suits Your EML Conversion?

Thunderbird, Apple Mail and Python have no license fee and suit small tasks. Converter software suits bulk data and extra formats.

FeatureThunderbirdApple MailPython scriptConverter software
CostFreeFreeFreeFree demo then paid
Skill neededMenu stepsMenu stepsBasic scriptingPoint and click
PlatformWindows, Mac and LinuxMacAny system with Python 3Windows
InputSingle folderSingle emailSingle folderMany files or folders
Date filterNoNoNoYes
ReportNoNoNoExportReport.csv

I suggest Thunderbird for a few folders and EmailDoctor for bulk archives that need filters.

How to Check MBOX Files After Conversion?

Check the output as soon as the conversion ends to confirm the MBOX file matches your EML files.

  • Test the import. Add the new .mbox file to your MBOX client then open a few emails.
  • Open the attachments. Open random emails with heavy attachments and open the PDF or JPEG files inside them. MBOX stores attachments as Base64 text so a failed attachment shows a faulty conversion.
  • Compare the headers. Open the internet headers of one email and check that the Date, From and To values match the original EML file.
  • Check the folders. Compare the folders in your MBOX client with your source folders. Inbox and Sent Items emails must appear in the folders you chose.

Common EML to MBOX Problems and Fixes

Five problems appear most during conversion.

  • Extension Missing. Restart Thunderbird after installation and follow our ImportExportTools NG fix guide.
  • Apple Mail Shows No EML Option. Import Mailboxes accepts only Apple Mail and mbox files so open every EML file and use Move To instead.
  • Script Finds No Emails. Check the folder path. Only files that end in .eml qualify.
  • Demo Stops at Ten Emails. The demo converts 10 emails per folder. Activate the full version for full folders.
  • MBOX Too Large. Divide oversized archives using Split MBOX File before you open them.

Frequently Asked Questions

Quick answers to common EML questions follow.

Do Attachments Survive the Conversion?

Yes. Thunderbird, Apple Mail, the Python script and converter software store attachments inside every message.

Does Thunderbird Export MBOX Directly?

Yes. Thunderbird imports EML files by drag and drop. ImportExportTools NG then exports the folder as an MBOX file.

Does Apple Mail Import EML Files?

No. Import Mailboxes accepts only Apple Mail and mbox files. Open an EML file in Mail and use Move To to add it to a mailbox.

Is There a Free Method for EML Conversion?

Yes. Thunderbird with ImportExportTools NG, Apple Mail and the Python script cost nothing. All three need manual steps.

Can I Convert EML Emails on Mac?

Yes. Thunderbird and Apple Mail work on Mac and Python works after you install Python 3. Converter software works only on Windows.

Does the Converter Need Outlook Installed?

No. Converter software needs only Windows and Microsoft .NET Framework 4.5 or above.

Can I Convert EML Emails From a Set Period?

Yes. Select Apply Date Range Filter on the Export Filter screen and add a Start Date and an End Date. Sent Date sets the range.

Can I Convert EMLX Files to MBOX?

Yes. Converter software accepts both EML and EMLX files. Apple Mail stores its messages as EMLX files.

How Many EML Files Fit in One MBOX File?

MBOX sets no limit on message count. Large files open slowly so divide big archives with Split MBOX File.

Which Email Clients Open the MBOX File?

Mozilla Thunderbird and Apple Mail open MBOX data. Outlook needs a PST file so Import MBOX to Outlook explains that conversion.

Final Words

EML to MBOX conversion goes wrong because an MBOX file stores a full folder and free methods work one folder or one email at a time. Thunderbird, Apple Mail and Python handle small tasks at no cost while converter software handles bulk data with filters and a report.

Back up your EML folders and test one small folder first. Open the MBOX file in Thunderbird and check the attachments and dates with the checklist above.

Need the same data as EML again? Convert MBOX to EML reverses the process.

  • EML files store single emails and MBOX files store full mailbox folders.
  • Thunderbird, Apple Mail and a Python script convert small batches for free.
  • Converter software converts bulk EML and EMLX data with a date filter and an export report.
  • Check attachments and headers after every conversion.
  Neeraj Kumar

By Neeraj Kumar

Neeraj Kumar is a Principal Technical Architect at EmailDoctor with 19+ years of experience in email migration, cloud migration, data recovery and digital forensics. He guides enterprise teams through Exchange, Office 365 and Google Workspace projects and shares what works as an EmailDoctor writer. Every method in his posts is tested on Windows and Mac before it goes live.