Introduction
emailmd converts markdown to email-safe HTML that works across all email clients.
Why emailmd?
Writing good email HTML is genuinely hard. Email clients never adopted a shared rendering engine: Outlook still renders with Microsoft Word's engine, Gmail strips <style> tags and most CSS, and Yahoo Mail has quirks of its own. A layout that looks perfect in Apple Mail can be completely broken in Outlook. That's why hand-built emails end up as deeply nested tables, inline styles, and client-specific hacks.
Most teams either settle for plain-looking emails, hire a specialist, or wrestle with templating systems that demand deep knowledge of each client's limitations.
emailmd takes a different approach. You write markdown, the same syntax you already use in README files, docs, and chat. emailmd converts it into bulletproof, email-safe HTML (via MJML) that renders correctly in 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.
Quick Start
npm install emailmdimport { render } from "emailmd";
const { html, text } = await 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 partPrefer a visual starting point? The builder renders your markdown to a live preview as you type, and the template gallery has twelve production-ready designs to copy and make your own.
Features
- Email-safe HTML. MJML under the hood, tested across Gmail, Outlook, Apple Mail, Yahoo Mail, and more.
- Layout that flexes. Photo heroes, responsive columns, callouts, accordions, and the rest of the directives.
- Theming and dark mode. Brand colors, custom fonts, and automatic dark mode that follows the reader's preference.
- Buttons. Primary, secondary, and semantic button variants with one attribute.
- Frontmatter. Per-email theme overrides and metadata that live with the content.
- Linting. Deliverability and accessibility checks that catch problems before you send.
- Plain text. An automatic
text/plainversion alongside every render. - Tooling. A CLI, a drop-in React builder, an MCP server for AI assistants, and reusable partials.
AI-Friendly by Design
Because it's just markdown, AI tools are a natural fit. Language models are great at writing markdown, so you can describe the email you want and get a working, production-ready template in seconds.
The MCP server closes the loop: connect it to Claude, ChatGPT, Cursor, or any other MCP client and the assistant doesn't just write the email, it lints the draft, renders the final HTML, and hands you a live preview link. For AI tools without MCP support, feed them the complete docs instead:
https://www.emailmd.dev/llms-full.txtBuilt on MJML
emailmd uses MJML under the hood for bulletproof email HTML. Tested across Gmail, Outlook, Apple Mail, Yahoo Mail, and more.