Free online MBOX to TXT converter
Convert email archives from MBOX into searchable plain UTF-8 TXT files.
Convert MBOX to TXT online - free
Your file is processed instantly and deleted as soon as you download it.
Import a file from a URL
Paste a direct link to the file. We download it to our server and it is converted exactly like an upload.
How it works
-
1/3
Upload your .mbox file
Click to browse to select your file you want to convert or simply drag & drop your file into selected area.
-
2/3
Perform .mbox to .txt conversion
After successful file upload, click to convert when you are ready.
-
3/3
Download converted .txt file
Conversion result is ready to download.
How to convert mbox to txt file
- Internet
- No ratings yet.
101convert.com assistant bot
24m
An email archive may need conversion when a script, editor, records system, or device accepts plain UTF-8 files instead of mailbox databases. TXT is also easier to search, quote, and share, but it cannot retain email folders, formatting, or attachments as separate objects.
What the MBOX format is
MBOX is a mailbox container that stores multiple email messages sequentially in one file, with each message separated by a line beginning with From . It is used by Mozilla Thunderbird, Apple Mail, Unix mail systems, and several older or open-source email clients. You commonly encounter it after exporting a mailbox, migrating between mail programs, recovering an old profile, or downloading an archive from a mail service.
An MBOX file contains email headers, message bodies, and often MIME parts for HTML content and attachments. It is not a document format, so changing its extension to .txt does not convert the messages into readable plain text.
What the TXT format is
TXT is a plain-text format containing characters without email-client metadata, HTML styling, mailbox indexes, or layout instructions. It works with text editors, command-line tools, OCR and indexing systems, scripts, and devices that accept UTF-8 text.
TXT is useful when you need a searchable transcript or a compact, portable representation of message content. It is smaller than an archive containing decoded attachments and does not require an email application, but it cannot preserve clickable links, rich formatting, labels, threading, or attachments in their original form.
How to actually convert MBOX to TXT
Use the online converter
- Open the free converter on 101convert.com.
- Select the MBOX file and choose TXT as the output format.
- Start the conversion and save the generated
.txtfile.
Use this method for a quick readable export when the archive does not require custom filtering. Do not use it for confidential mail unless the service's handling and retention terms meet your requirements.
Convert locally with Python
The Python standard library can extract the first plain-text body from every message and write one UTF-8 document. Save the following as mbox_to_txt.py:
import mailbox
import sys
def get_body(message):
if message.is_multipart():
for part in message.walk():
if part.get_content_type() == 'text/plain' and not part.get_filename():
return decode_part(part)
return '[No plain-text body; the message may contain HTML only]'
return decode_part(message)
def decode_part(part):
raw = part.get_payload(decode=True)
if raw is None:
value = part.get_payload()
return value if isinstance(value, str) else ''
charset = part.get_content_charset() or 'utf-8'
return raw.decode(charset, errors='replace')
source, destination = sys.argv[1], sys.argv[2]
with mailbox.mbox(source) as archive, open(destination, 'w', encoding='utf-8', newline='\n') as output:
for number, message in enumerate(archive, 1):
output.write('Message %d\n' % number)
for field in ('Date', 'From', 'To', 'Cc', 'Subject'):
value = message.get(field)
if value:
output.write('%s: %s\n' % (field, value))
output.write('\n')
output.write(get_body(message).rstrip())
output.write('\n\n' + ('=' * 72) + '\n\n')
Run it from a terminal with:
python mbox_to_txt.py archive.mbox mail.txt
On Windows, use py mbox_to_txt.py archive.mbox mail.txt if the python command is unavailable. Replace the filenames with the actual paths; quote paths containing spaces.
Quality and compatibility limitations
- The script prefers
text/plain. Messages containing only HTML produce a placeholder instead of a rendered body; converting HTML to readable plain text requires a separate HTML parser or an email client export. - Attachments are not embedded in the output. Their filenames and MIME headers may be omitted, while binary data is unsuitable for a readable TXT file.
- Characters that use an unknown or invalid source encoding are replaced during UTF-8 decoding. Review multilingual messages after conversion.
- The output combines all messages into one file and inserts separators. It does not preserve mailbox folders, labels, read status, threading, dates as sortable metadata, or the original raw MIME source.
- Keep the original MBOX as the archival copy. TXT is a content extract, not a reversible replacement for the mailbox.
Note: This mbox to txt conversion record is incomplete, must be verified, and may contain inaccuracies. Please vote below whether you found this information helpful or not.
Frequently asked questions
Is the MBOX to TXT converter free?
Yes, converting MBOX to TXT on 101convert.com is completely free. No registration, email address or installation is required. If you need a higher file size limit or want to convert more files at once, see our plans.
How large can my MBOX file be?
You can upload MBOX files up to 2000 MB and convert up to 5 files at once in a single batch.
What happens to my uploaded files?
Files are processed automatically and deleted from our servers within a few minutes after conversion. We never view or share your files.
Do I need to install any software to convert MBOX to TXT?
No. The MBOX to TXT conversion runs entirely online in your browser and works on Windows, Mac, Linux, Android and iPhone.
Did the conversion fail?
In most cases, the cause is an incorrect file format. Please upload a valid MBOX file for this MBOX to TXT conversion. Occasionally, the issue may be on our side. We analyze recurring conversion failures and disable or fix the converter if we detect a defect.