Build Story

I Built an MBOX Converter in 30 Minutes with Claude

January 2026 · 5 min read

A client needed to migrate Google Vault email exports to Outlook. The problem: Google exports in MBOX format. Outlook needs EML files. There's no native converter.

Instead of searching for paid tools or complicated scripts, I built one myself. Here's exactly how.

The Problem

Google Vault exports emails as .mbox files—a format from the 1970s that bundles thousands of emails into a single file. Outlook can't read it. Neither can most email clients.

The client had 50,000+ emails to migrate. Manual conversion wasn't an option.

The Solution: 82 Lines of Python

The core converter is embarrassingly simple:

def convert_mbox(mbox_path, output_dir):
    mbox = mailbox.mbox(mbox_path)
    count = 0
    for msg in mbox:
        # Create filename from date + sender + subject
        filename = f"{date}_{sender}_{subject}.eml"
        with open(output_dir / filename, 'wb') as f:
            f.write(msg.as_bytes())
        count += 1
    return count

Python's mailbox module does all the heavy lifting. Each email in the MBOX becomes a separate .eml file that Outlook opens natively.

Making it User-Friendly

A command-line script wouldn't work for a non-technical client. I needed a native Mac app with drag-and-drop support.

Problem: Python's tkinter wasn't available on my system. Solution: AppleScript wrapper calling the Python backend.

-- AppleScript handles GUI
set selectedFiles to choose file
-- Python does the conversion
do shell script "python3 converter_core.py " & quoted form of filePath

Compiled with osacompile, it becomes a proper .app that lives in the Applications folder.

Results

30
Minutes to build
82
Lines of code
50K+
Emails converted

Key Lessons

  • Standard libraries are powerful. Python's mailbox module handled all the MBOX parsing—no external dependencies.
  • AppleScript + Python = native Mac apps. When GUI frameworks don't cooperate, hybrid approaches work.
  • Build small, ship fast. The client didn't need a beautiful app. They needed their emails converted today.

The full code is open source. If you're migrating from Google Vault to Outlook, reach out—I'll share the app.

Get the MBOX Converter App (macOS)

The same tool from this article. Drag & drop MBOX files, get individual EML files in seconds.

Related Service

Email Forensics & Compliance

Need to migrate, investigate, or monitor email at scale? I help companies with Google Workspace forensics, legal holds, and compliance reporting. From one-off migrations to ongoing monitoring.

Learn more →

Related Posts

98% Cost Reduction: Optimizing AI API Calls

From $100/month to $2/month with model selection and caching.

Multi-Tenant Slack Bot: One App, Three Workspaces

Config-driven architecture for multi-workspace Slack bots.

Evgeny Goncharov - Founder of TechConcepts, ex-Yandex, ex-EY, Darden MBA

Evgeny Goncharov

Founder, TechConcepts

I build automation tools and custom software for businesses. Previously at Yandex (Search) and EY (Advisory). Darden MBA. Based in Madrid.

About me LinkedIn GitHub
← All blog posts

Need a custom tool built fast?

15 minutes. No pitch. Just honest advice on whether I can help.

Book a Call