TechBuzzPro

How to Import MBOX Files to Gmail: Step-by-Step

· 7 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Gmail does not have a built-in MBOX importer, so you cannot upload an MBOX file directly through Gmail's settings. The reliable way to get MBOX mail into a Gmail account is to first load the MBOX into a desktop mail client that can read it, then let that client upload the messages to Gmail over IMAP. The most common tool for this is Mozilla Thunderbird, which is free, runs on Windows, macOS and Linux, and can both import MBOX files and connect to Gmail. The steps below use Thunderbird because it is the method most widely documented and least likely to lose messages, but any desktop client that supports MBOX import and IMAP upload will work the same way.

What You'll Need

  • A Gmail account with IMAP enabled. IMAP is on by default for new accounts, but you can confirm it in Gmail's settings under the Forwarding and POP/IMAP tab.
  • The MBOX file or files you want to import. If you have several, keep them in one folder and note their names.
  • A desktop computer (Windows, macOS or Linux). This process is not practical on a phone or tablet.
  • Mozilla Thunderbird installed from the official Mozilla website.
  • Enough free space on your computer for the MBOX files plus a copy of the mail inside Thunderbird's profile.
  • An app password for Gmail if your Google account has 2-Step Verification turned on. Google requires an app password for desktop mail clients in that case; you create one in your Google Account under Security.

Step-by-Step

  1. Back up the MBOX files first. Copy them to a separate folder or drive before you touch anything. Importing and uploading can take hours, and a corrupted source file is much harder to recover than a copied one.
  2. Enable IMAP in Gmail. Sign in to Gmail in a browser, open Settings (the gear icon), go to the Forwarding and POP/IMAP tab, and make sure IMAP access is enabled. Menu labels can differ slightly by version and region, but this tab has been stable for years.
  3. Create an app password if needed. If 2-Step Verification is on, go to your Google Account security settings and generate an app password for mail. Copy it somewhere safe; you will paste it into Thunderbird instead of your normal password.
  4. Install Thunderbird and set up your Gmail account. Open Thunderbird, choose to add an existing email account, enter your Gmail address and the app password (or your normal password if 2-Step Verification is off). Thunderbird will detect the IMAP server settings automatically. Accept them and let it finish.
  5. Import the MBOX file into Thunderbird. Thunderbird does not have a single "Import MBOX" button in every version, so the dependable method is to place the MBOX file directly into Thunderbird's Local Folders directory. In Thunderbird, open Help > Troubleshooting Information (or the equivalent menu in your version) and find the Profile Folder path. Close Thunderbird, open that folder, go into the Mail > Local Folders subfolder, and copy your MBOX file there. Rename it so it has no extension, or give it a name ending in .mbox if your version expects that; Thunderbird treats a file in Local Folders as a mail folder. Reopen Thunderbird and the folder should appear under Local Folders.
  6. Check that the messages are readable. Click the new folder in Thunderbird and scroll through. If messages appear blank or garbled, the file may not be a true MBOX, or it may be in a variant such as MBOX with a different line-ending format. Do not proceed to upload until the mail looks correct.
  7. Select the messages and copy them to Gmail. Click the first message, then use Ctrl+A (Cmd+A on macOS) to select all, or Shift-click to select a range. Right-click the selection and choose Copy To > your Gmail account > a folder such as [Gmail]/All Mail or a label you created. Copy, not Move, so the originals stay in Local Folders if something fails.
  8. Wait for the upload to finish. Thunderbird uploads over IMAP in the background. Large mailboxes can take a long time, and the status bar at the bottom shows progress. Keep the computer awake and connected. Do not close Thunderbird until the upload completes.
  9. Verify in Gmail. Sign in to Gmail in a browser and check the label or All Mail. Search for a subject line you know was in the MBOX to confirm the messages arrived. Gmail may take a few minutes to index new mail before search finds it.
  10. Clean up. Once everything is confirmed in Gmail, you can remove the copied folder from Thunderbird's Local Folders and delete the temporary copies to free disk space. Keep your original MBOX backup until you are satisfied.

Common Mistakes

  • Trying to upload the MBOX file to Gmail directly. Gmail has no MBOX import option. Any site or tool claiming to do it in one click is either converting the file first or asking for your password, which you should not hand over.
  • Using Move instead of Copy. Moving messages out of Local Folders removes them from the source. If the upload fails halfway, you have lost the local copy.
  • Forgetting the app password. With 2-Step Verification on, your normal Gmail password will be rejected by Thunderbird. This is the most common reason the account setup fails.
  • Importing into the wrong Thunderbird folder. Dropping the MBOX file into the profile root instead of Mail > Local Folders means Thunderbird will not see it as a mail folder.
  • Closing Thunderbird too early. The upload runs in the background; quitting the app mid-transfer can leave a partial copy in Gmail.

Tips

  • Split very large MBOX files into smaller ones before importing. A single multi-gigabyte file is slow to open and more likely to hit upload errors.
  • Create a dedicated Gmail label before you start, then copy messages into that label. It makes verification and cleanup much easier than mixing imported mail into All Mail.
  • Run the upload overnight on a wired connection if the mailbox is large. IMAP uploads are sensitive to dropped Wi-Fi.
  • Keep a plain-text note of which MBOX file went into which Gmail label, especially if you are importing several archives.
  • If you only need the mail for reference, consider archiving the MBOX to cloud storage instead of importing it. Gmail storage is shared across Mail, Drive and Photos, so a large import can use up your quota.

Troubleshooting

If the folder does not appear in Thunderbird after copying the file, close the app completely, confirm the file is in Mail > Local Folders and not a subfolder, and check that it has no unexpected extension such as .mbox.txt. Reopen and look again.

If messages show as blank or unreadable, the file may be a different mailbox format. Open it in a text editor and check that messages begin with a line starting "From " followed by a space and a date. If not, it is not standard MBOX and needs converting first.

If the Gmail account will not connect, sign out and back in, confirm IMAP is still enabled, and regenerate the app password. Check Google's service status page if sign-in fails for every device.

If the upload stalls, stop the copy, restart Thunderbird, and copy a smaller batch of messages at a time. If Gmail reports that storage is full, free space or buy more storage before continuing; the upload will fail otherwise.

If messages arrive in Gmail but with wrong dates, check the Date headers in the original file. Thunderbird preserves them, but malformed headers in old exports can cause Gmail to show the import date instead.

Frequently Asked Questions

Can Gmail import an MBOX file directly?

No. Gmail's settings offer import from other accounts and from a CSV or archive for contacts, but not MBOX mail. You need a desktop client to upload the messages over IMAP.

Will the original sender and date be preserved?

Usually yes. Thunderbird uploads the original message headers, so Gmail shows the original From address and Date. Malformed headers in old exports are the main exception.

Does this work with Google Workspace accounts?

Yes, provided IMAP is enabled by your administrator and you use an app password if 2-Step Verification is enforced. Some Workspace domains restrict IMAP, so check with your admin if sign-in fails.

How long does the upload take?

It depends on mailbox size and connection speed. A few thousand messages can take under an hour; tens of thousands can take many hours. Keep the computer awake and connected.

Can I do this on a phone or tablet?

Not practically. The import step requires access to Thunderbird's profile folder on a desktop operating system, and mobile mail apps do not read MBOX files.

What if I do not want to use Thunderbird?

Other desktop clients that can read MBOX and connect to Gmail over IMAP will work in the same way. The key requirements are MBOX import support and IMAP upload, not the specific app.