Earlier this week, I needed to analyze a specific email with AI - not my entire inbox, just one email. So I downloaded the .eml file and tried feeding it directly to an AI tool.
It didn’t work well.
Next thought: convert it to Markdown first. AI handles Markdown much better. Simple, right?
I ran pipx install eml2md and got an error. The only package for the job was abandoned - pinned to Python 3.10 and below, last updated in 2022. I was on Python 3.14.
So I did the obvious thing: built my own.
Why Not Just Use an “AI Email Assistant”?
Two things pushed me to build something local:
- I didn’t want to go through the pain of defining the guard rails to specifically focus on that one particular email from my inbox mess and ensure it only picks data from that specific email - that was the whole point of downloading the .eml file
- Customers sometimes send
.emlfiles directly, and I needed a reliable, fully local way to parse them for AI workflows - no uploading to tools that aren’t approved for corporate use
If you already have .eml files, you shouldn’t need to pipe your entire inbox through a third-party service to make them readable.
What eml-to-md Does
A small, focused tool. Files in → Markdown out. That’s it.
- Converts HTML emails to proper Markdown (headings, bold, links, lists)
- Preserves plain text emails as-is
- Handles multipart MIME (prefers the HTML part)
- Lists attachments with file sizes
- Works as a CLI tool or a Python library
eml2md message.eml
eml_to_md.convert("message.eml")
Deliberately Small
This tool doesn’t parse .mbox archives (yet). It doesn’t fetch from IMAP. It doesn’t do sentiment analysis or summarization. It converts .eml to .md, and it does that one thing well.
If you’re building a local email analysis pipeline, archiving old correspondence, or just want exported emails in a format that plays nice with Obsidian, Notion, or any Markdown-based tool - this is for you.
Supports Python 3.9–3.14+. Because your tools shouldn’t break when you update your runtime.
pip install eml-to-md

Links:
- GitHub: glnarayanan/eml-to-md
- PyPI: eml-to-md