Convert mbox email archives to beautiful, readable HTML files.
- 📧 Converts mbox files to clean, styled HTML
- 📁 Process single files or entire directories recursively
- 🎨 Beautiful responsive design with CSS styling
- 📋 Expandable email headers
- ⚡ Streaming parser for handling large mbox files
- 🔄 Skip existing files or force overwrite
No installation needed! Just run:
bunx mbox-to-html <path-to-mbox>bun install -g mbox-to-htmlnpx mbox-to-html <path-to-mbox>bunx mbox-to-html ./emails.mboxThis creates emails.mbox.html in the same directory.
bunx mbox-to-html ./mail-archive/Recursively finds and converts all .mbox files.
bunx mbox-to-html ./emails.mbox --force| Option | Alias | Description |
|---|---|---|
--force |
-f |
Overwrite existing HTML files |
--help |
-h |
Show help message |
--version |
-v |
Show version number |
You can also use mbox-to-html as a library:
import { convertMbox } from 'mbox-to-html';
// Convert a single file
await convertMbox('./emails.mbox');
// Convert with options
await convertMbox('./mail-archive/', { force: true });The generated HTML includes:
- Email subject, sender, and date
- Full email body (HTML or plain text)
- Collapsible detailed headers section
- Responsive design that works on mobile and desktop
- Clean, modern styling
- Bun runtime (for best performance)
- Or Node.js 18+
MIT © Ozan Turksever