Introduction
Email.md converts markdown to email-safe HTML that works across all email clients.
Why Email.md?
Writing good email HTML is really hard. Unlike web pages, email clients don't share a modern rendering engine - Outlook still uses Microsoft Word's rendering engine, Gmail strips out <style> tags and most CSS, and Yahoo Mail has its own quirks. What looks perfect in Apple Mail can be completely broken in Outlook. This means email developers end up writing deeply nested tables, inline styles, and client-specific hacks just to get a simple layout to work everywhere.
Most teams either settle for plain-text-looking emails, hire a specialist, or wrestle with complex templating systems that require deep knowledge of each client's limitations.
Email.md takes a different approach. Instead of fighting with HTML tables and inline CSS, you write Markdown - the same simple syntax you already use in README files, docs, and chat. Email.md handles the hard part: converting that markdown into bulletproof, email-safe HTML (via MJML) that renders correctly across Gmail, Outlook, Apple Mail, Yahoo Mail, and every other major client.
It won't cover every edge case a hand-crafted HTML email can - but it handles 80%+ of email design needs in a fraction of the time and complexity.
And because it's just markdown, AI is a natural fit. Large language models are great at writing markdown, which means you can use AI to draft, iterate, and generate Email.md templates quickly. Describe the email you want and get a working, production-ready template in seconds.
To give your AI tool full knowledge of Email.md's syntax and features, feed it the complete docs:
https://www.emailmd.dev/llms-full.txtQuick Start
npm install emailmdimport { render } from "emailmd";
const { html, text } = render(`
# Welcome!
Thanks for signing up.
[Get Started](https://example.com){button}
`);
// html → complete email-safe HTML (works in Gmail, Outlook, Apple Mail, everything)
// text → plain text version for text/plain MIME partFeatures
- Email-Safe HTML - Powered by MJML for bulletproof rendering across all email clients
- Rich Markdown - Tables, task lists, buttons, callouts, heroes, and more
- Theming - Light/dark themes, brand colors, full customization
- Frontmatter - Override theme values and set metadata per-email
- Directives - Header, hero, callout, highlight, centered, and footer blocks
- Plain Text - Automatic plain text generation for the
text/plainMIME part
Built on MJML
Email.md uses MJML under the hood for bulletproof email HTML. Tested across Gmail, Outlook, Apple Mail, Yahoo Mail, and more.