File Extension File Extension Guide

What is an MBOX File?

A comprehensive guide to understanding MBOX files, the universal standard for storing and archiving email messages in a single, portable file format used by major email clients worldwide.

Email Archive 📧 Mail Storage 💻 Cross-Platform
.MBOX

Email Mailbox File

Type:Email Archive
MIME:application/mbox
Opens with:Email Clients
Text-based:Yes (readable)

📖 What is an MBOX File?

An MBOX file (short for mailbox) is a widely-used file format for storing collections of email messages in a single, concatenated text file. Each email message is stored sequentially, separated by a special "From " line that marks the beginning of each message.

Originally developed for Unix systems in the 1970s, MBOX has become one of the most universally supported email storage formats. Major email clients like Mozilla Thunderbird, Apple Mail, and services like Gmail (via Google Takeout) use MBOX for email backup and migration purposes.

Email Content

  • Complete email headers
  • Message body (plain text & HTML)
  • Attachments (MIME encoded)
  • Inline images and media

Key Characteristics

  • Plain text format (human-readable)
  • Single file stores multiple emails
  • Universally compatible format
  • No size limits (can be gigabytes)
💡 Did you know? The MBOX format was one of the first standardized ways to store email and dates back to the early days of Unix in the 1970s. Despite being over 50 years old, it remains actively used today due to its simplicity and universal compatibility.

⚡ Quick Facts

File Extension.mbox, .mbx, or no extension
Full NameMailbox (Unix Mailbox Format)
CategoryEmail Storage / Archive File
MIME Typeapplication/mbox
Developed ByUnix developers (1970s)
RFC SpecificationRFC 4155 (2005)
File TypePlain text (concatenated emails)
Character EncodingTypically ASCII/UTF-8 with MIME
Multiple EmailsYes - primary purpose is storing many emails
Attachment SupportYes - MIME encoded (Base64)
Typical SizeCan range from KB to several GB

📜 History & Origins

The MBOX format has a rich history spanning over five decades of email communication:

1970s - Unix Origins

MBOX format created as part of early Unix mail systems. The simple "From " separator line approach allowed easy concatenation of messages.

1980s - Widespread Adoption

As Unix spread through universities and research institutions, MBOX became the de facto standard for local email storage.

1990s - Email Client Support

Popular email clients like Pine, Elm, and later Netscape Mail adopted MBOX support, cementing its place in email infrastructure.

2005 - RFC 4155 Published

The Internet Engineering Task Force (IETF) published RFC 4155, formally documenting the MBOX format and its variants.

Present Day

MBOX remains widely used for email backup, migration, and archival. Google Takeout, Thunderbird, and Apple Mail all support MBOX export/import.

✅ Longevity: Few file formats have remained relevant for as long as MBOX. Its simple, text-based design means emails stored in MBOX files from the 1980s can still be read today with modern email clients.

🔧 MBOX File Structure

MBOX files use a straightforward structure where emails are concatenated together, each starting with a special "From " line (note the space after "From"). Here's what the structure looks like:

From sender@example.com Sat Jan 20 10:30:00 2025
Return-Path: <sender@example.com>
Delivered-To: recipient@example.com
From: John Smith <sender@example.com>
To: Jane Doe <recipient@example.com>
Subject: Meeting Tomorrow
Date: Sat, 20 Jan 2025 10:30:00 -0500
Content-Type: text/plain; charset="UTF-8"

Hi Jane,
Just confirming our meeting tomorrow at 2 PM.
Best regards,
John

From another@example.com Sun Jan 21 14:15:00 2025
From: Sarah Wilson <another@example.com>
To: recipient@example.com
Subject: Project Update
...

Key Structural Elements

📍 "From " Separator Line

Each message begins with "From " followed by the sender's email and a timestamp. This line is not part of the email itself, it's a delimiter. The format is: From sender@email.com Day Mon DD HH:MM:SS YYYY

📋 Email Headers

Standard email headers follow (From, To, Subject, Date, Content-Type, etc.). These are the actual RFC 5322 headers that email clients use to display message information.

📝 Message Body

After a blank line separating headers, the message body appears. This can be plain text, HTML, or multipart MIME content including attachments.

📎 Attachments (MIME)

Attachments are embedded using MIME encoding (typically Base64). They appear as encoded text blocks within multipart messages, making the file self-contained.

Common Email Headers in MBOX

HeaderDescriptionExample
FromSender's name and email addressJohn Smith <john@example.com>
ToRecipient's addressjane@example.com
SubjectEmail subject lineWeekly Report
DateDate and time sentMon, 20 Jan 2025 09:00:00 -0500
Message-IDUnique message identifier<abc123@mail.example.com>
Content-TypeMIME type of message contentmultipart/mixed; boundary="..."
X-Gmail-LabelsGmail-specific labels (in exports)Inbox, Important, Starred
Return-PathBounce address for delivery failures<bounce@example.com>
⚠️ Important: If a line in the email body starts with "From ", it must be escaped (typically by prefixing with ">") to prevent it from being mistaken as a new message delimiter. Different MBOX variants handle this escaping differently.

📊 MBOX Variants

Over the years, several variations of the MBOX format emerged to address different implementation needs. Here are the four main variants:

mboxo

Original Format

The Classic

  • Original Unix implementation
  • Simple "From " line escaping
  • Lines starting with "From " get ">" prefix
  • Information may be lost on retrieval
Legacy
mboxrd

Reversible Format

Most Compatible

  • Improved escaping mechanism
  • ">From " escaping is reversible
  • No information loss
  • Used by many modern clients
Recommended
mboxcl

Content-Length

Size-Based

  • Adds Content-Length header
  • Message size specified in bytes
  • Faster random access
  • No "From " escaping needed
Efficient
mboxcl2

Hybrid Format

Best of Both

  • Combines mboxrd + mboxcl
  • Content-Length header present
  • Also uses ">From " escaping
  • Maximum compatibility
Comprehensive
💡 Compatibility Tip: Most modern email applications can read all MBOX variants automatically. When exporting or creating MBOX files, the mboxrd variant is generally recommended as it provides reversible escaping and wide compatibility across different email clients.

📂 How to Open an MBOX File

MBOX files can be opened with various email clients and specialized viewers. Here are the most common methods:

Windows

Mozilla Thunderbird Microsoft Outlook* Mailspring Univik MBOX Viewer

*Outlook requires import add-in or conversion

macOS

Apple Mail Mozilla Thunderbird Mailmate

Linux

Mozilla Thunderbird Evolution Mutt Alpine

Online Services

Google Workspace Migration Online MBOX Viewers

Opening MBOX in Mozilla Thunderbird

  1. Install Thunderbird if you haven't already (free download from mozilla.org).
  2. Open Thunderbird and go to Tools → Import (or Menu → Account Settings → Import).
  3. Select "Import from file" and choose your MBOX file.
  4. Choose destination folder in Thunderbird (usually "Local Folders").
  5. Browse the imported emails, they appear as a new folder with all messages preserved.

Opening MBOX in Apple Mail

  1. Open Apple Mail on your Mac.
  2. Go to File → Import Mailboxes from the menu bar.
  3. Select "Files in mbox format" and click Continue.
  4. Navigate to your MBOX file and select it.
  5. Emails import to "Import" folder under "On My Mac" in the sidebar.
⚠️ For Microsoft Outlook: Outlook doesn't natively support MBOX files. You'll need to either: (1) Import via Thunderbird first, then export to PST, (2) Use a third-party MBOX to PST converter, or (3) Use an MBOX import add-in for Outlook.

📬 Gmail Takeout Export

One of the most common sources of MBOX files today is Google Takeout, which lets you download all your Gmail emails in MBOX format:

How to Export Gmail to MBOX

  1. Go to Google Takeout
    Visit takeout.google.com and sign in to your Google account.
  2. Deselect All, Then Select Mail
    Click "Deselect all" first, then scroll down and check only "Mail" to export just your emails.
  3. Choose Labels (Optional)
    Click "All Mail data included" to select specific labels/folders to export, or leave it to export everything.
  4. Configure Export Settings
    Choose delivery method (download link), file type (.zip), and maximum file size (up to 50GB).
  5. Request Export
    Click "Create export" and wait for Google to prepare your files (can take hours to days for large mailboxes).
  6. Download and Extract
    Download the ZIP file when ready, extract it, and find your MBOX file(s) inside the "Mail" folder.

📁 What You Get

  • All Mail.mbox, Contains all emails
  • Label-specific .mbox files, If you selected specific labels
  • Gmail metadata, Labels preserved in X-Gmail-Labels header
  • Attachments included, Embedded in MIME format
💡 Gmail Labels in MBOX: Google preserves Gmail labels in a special X-Gmail-Labels header within each email. This allows you to see which labels (Inbox, Starred, Important, custom labels) were applied, though not all email clients display this information.

🎯 Common Uses

MBOX files serve many practical purposes for email management and data preservation:

Backup

Email Backup

Create offline backups of your entire email history. Essential for data protection and disaster recovery.

Migration

Email Migration

Move emails between different email services or clients. Universal format works across platforms.

Forensics

Digital Forensics

Investigate email communications for legal cases, compliance audits, and security incidents.

Archive

Long-term Archival

Store historical email records for compliance, record-keeping, or personal preservation.

Compliance

Regulatory Compliance

Meet legal requirements for email retention in healthcare, finance, and legal industries.

Service Switch

Service Provider Switch

Leave Gmail, Yahoo, or other services while preserving all your email history.

⚖️ MBOX vs Other Formats

Understanding how MBOX compares to other email storage formats helps you choose the right one for your needs:

MBOX vs PST (Outlook)

FeatureMBOXPST
Format TypePlain text (concatenated)Binary database
DeveloperOpen standard (Unix)Microsoft proprietary
StoresEmails onlyEmails, contacts, calendar, tasks
Compatibility✅ Universal⚠️ Outlook-focused
Human Readable✅ Yes❌ No (binary)
File Size LimitNone (practically)50GB (Outlook 2010+)
Corruption RiskLow (simple format)Higher (complex structure)
Best ForBackup, migration, archivalOutlook users, full PIM data

MBOX vs EML

FeatureMBOXEML
StructureMultiple emails in one fileOne email per file
File ManagementSingle file to manageMany files (one per email)
SearchRequires email clientOS file search works
Portability✅ Excellent✅ Excellent
Storage EfficiencyMore compactSome overhead per file
Best ForFull mailbox backupIndividual email archival
✅ Choose MBOX when:
  • Backing up entire mailboxes
  • Migrating between platforms
  • Long-term archival needed
  • Cross-platform compatibility matters
📊 Choose PST when:
  • Using Microsoft Outlook primarily
  • Need contacts + calendar too
  • Enterprise Windows environment
  • Outlook-specific features needed
📄 Choose EML when:
  • Archiving individual emails
  • Need quick file-based access
  • Sharing specific emails
  • Legal/compliance single-email needs

🔧 Troubleshooting

Common issues when working with MBOX files and their solutions:

  • Check file extension: Ensure the file has .mbox extension (some exports have no extension)
  • File corruption: Open in text editor to verify structure starts with "From " line
  • Large file: Very large MBOX files (10GB+) may need splitting or specialized tools
  • Character encoding: Some emails may have encoding issues, try different import settings

  • MIME encoding issue: Attachment may be improperly encoded, try different email client
  • Incomplete export: Large attachments may have been truncated during export
  • Base64 corruption: Line breaks in encoded content can cause issues
  • Use dedicated viewer: Specialized MBOX viewers handle attachments better

  • Encoding mismatch: Try importing with UTF-8 encoding specified
  • International characters: Older MBOX files may use non-standard encodings
  • Content-Type header: Check if emails have correct charset specified
  • Convert encoding: Use tools to convert file to UTF-8 before import

  • Duplicate detection: Email client may be filtering duplicates automatically
  • Corrupt separators: Some "From " lines may be malformed
  • Large mailbox: Import may have timed out, try splitting the MBOX
  • Check spam folder: Imported emails may be filtered to spam

  • Split large files: Divide MBOX into smaller chunks (by year or size)
  • Use SSD storage: MBOX operations are I/O intensive
  • Close other programs: Free up RAM for processing
  • Index after import: Let email client finish indexing before heavy use

❓ Frequently Asked Questions

There is no technical size limit for MBOX files. MBOX files can grow to many gigabytes, containing thousands or millions of emails. However, practical limits depend on: available disk space, RAM for processing, email client capabilities, and file system limits (though modern systems support very large files). For best performance, consider splitting files larger than 2-4GB.

Yes! There are several methods to convert MBOX to PST:

  • Via Thunderbird: Import MBOX to Thunderbird, then export to EML and import to Outlook
  • Dedicated converters: Use MBOX to PST conversion tools
  • Online services: Various online conversion services are available
  • Import add-ins: Some Outlook add-ins can import MBOX directly

MBOX files are plain text and not encrypted by default. Consider these security measures:

  • File encryption: Use tools like VeraCrypt or BitLocker to encrypt MBOX files
  • Secure storage: Store on encrypted drives or secure cloud services
  • Access control: Set proper file permissions to limit access
  • Audit content: Review before sharing, MBOX contains full email text

Since MBOX is plain text, merging is straightforward:

  • Command line (Linux/Mac): cat file1.mbox file2.mbox > merged.mbox
  • Windows: copy /b file1.mbox+file2.mbox merged.mbox
  • Using software: Import both into Thunderbird, then export combined
  • Note: Ensure each source file ends with a newline for clean merging

Yes, but with caution! MBOX files can be edited with any text editor since they're plain text. However:

  • Back up first: Always create a copy before editing
  • Preserve structure: Don't modify "From " separator lines unless you know what you're doing
  • Watch encoding: Save with the same encoding (usually UTF-8)
  • Large files: Use editors that handle large files (VS Code, Sublime, Notepad++)

This is common with Unix/Linux-originated MBOX files. In Unix tradition, file extensions are optional. The file is identified by its content, not its name. To fix this:

  • Rename the file: Simply add ".mbox" to the filename
  • Gmail Takeout: These files often come without extension, just rename them
  • Thunderbird profiles: Look for files named "Inbox", "Sent" (no extension), these are MBOX

Several options for searching MBOX content:

  • Import to email client: Use Thunderbird/Outlook's built-in search after import
  • Text search tools: Use grep (Linux/Mac) or findstr (Windows) for simple searches
  • Dedicated viewers: MBOX viewer tools often include search functionality
  • Programming: Python libraries like mailbox allow programmatic searching

🛠️ Related Tools

Viewer

MBOX File Viewer

Free tool to open and view MBOX emails without importing them.

Open MBOX Files →
Converter

MBOX Converter

Convert MBOX files to PST, EML, PDF and other formats.

Convert MBOX Files →

📝 Summary: Key Points About MBOX Files

  • MBOX is a universal format for storing email messages
  • Uses .mbox or .mbx file extension (or none)
  • Plain text format that is human-readable
  • Stores multiple emails in a single file
  • Four main variants: mboxo, mboxrd, mboxcl, mboxcl2
  • Supports attachments via MIME encoding
  • Compatible with Thunderbird, Apple Mail, and more
  • Used for Gmail Takeout email exports
  • Best for backup, migration, and archival
  • Over 50 years old and still widely used
  • No practical size limits on file size
  • RFC 4155 provides formal specification