Markdown to Email HTML: Getting Your Content Into Newsletters and ESPs
If you write your newsletter or transactional emails in Markdown and then paste the rendered HTML straight into your ESP (Mailchimp, Substack’s HTML block, SendGrid, a custom mailer), you’ve probably noticed it doesn’t look the way it did in your browser preview. Headings lose their styling, spacing collapses, and in Outlook things can look outright broken. That’s not a bug in your Markdown renderer — it’s because HTML email is not the same target as a web page, and a plain markdown-to-html conversion doesn’t account for the difference.
This guide covers why email HTML has to be built differently, what converts cleanly, the gotchas that catch people off guard, and how our Markdown to Email HTML converter handles it.
Why Email HTML Is a Different Target
A normal web page loads a stylesheet once and applies it to every element on the page. Email doesn’t work that way, for a simple reason: most email clients strip <style> blocks and ignore external CSS entirely, either for security or because their rendering engine doesn’t support it. Gmail, in particular, is aggressive about stripping <head> styles in some contexts. That means the only styling that reliably survives is a style="..." attribute written directly on the element itself — this is called inlining.
The second difference is layout. Browsers give you flexbox, grid, and reasonably consistent box-model behavior across engines. Email clients don’t. The safest way to guarantee a layout holds together across a dozen different rendering engines is still the decades-old technique of nesting <table> elements — not because tables are a good layout tool in 2026, but because table rendering is the one thing almost every email client agrees on.
Put together, that means converting Markdown to email-safe HTML isn’t just “run it through a Markdown parser.” It means:
- Every styled element gets its CSS written inline, on the tag itself
- The outer structure — the thing that keeps your content centered and a sane width — uses a table shell instead of
<div>s and CSS width rules - You explicitly plan for what email clients don’t support (external images that aren’t hosted,
<style>blocks, modern CSS like flexbox)
The Design Choice: Styled Semantic Tags, Not Table Soup
Some hand-coded email tools go further and convert every single text element — headings, paragraphs, list items — into nested <table>/<td> structures, on the theory that tables are the only truly safe primitive. We didn’t do that in our converter, and it’s worth explaining why, since it’s a deliberate tradeoff rather than a shortcut.
Our Markdown to Email HTML tool uses real semantic tags — <h1>–<h6>, <p>, <ul>/<ol>, <blockquote> — each with a full inline style attribute, and reserves table markup for the two places where it actually matters: the outer structural shell (a single-column, centered, fixed-width wrapper) and any actual Markdown tables in your source content. Modern email clients (Gmail, Apple Mail, most mobile mail apps) render styled semantic HTML just fine. The clients that historically didn’t — older Outlook versions using Word’s rendering engine — have specific, narrower problems (mostly around margins, background images, and some CSS properties), not a blanket rejection of non-table markup. Table-izing every paragraph adds a lot of markup weight and makes the output harder to hand-edit, for a compatibility gain that mostly doesn’t apply anymore outside of layout-critical sections.
If your use case is a highly stylized marketing email — multi-column layouts, background images behind text, precise pixel positioning — you’ll still want a dedicated tool like MJML (more on that below). This tool is aimed at the more common case: turning a piece of Markdown-authored content (a newsletter issue, a docs update, a transactional notice) into clean, reliable email HTML without hand-coding it.
What Converts Cleanly
- Headings — converted to
<h1>–<h6>with inline font-size, weight, and color, using an Arial/Helvetica fallback stack (email clients have unreliable web font support, so system fonts are the safe default) - Bold, italic, strikethrough, inline code — straightforward inline styling
- Paragraphs — inline margin/line-height for readable spacing
- Links — inline-styled
<a>tags, underlined, in a consistent brand color - Lists — bulleted and numbered, including nesting
- Blockquotes — left border plus muted, italicized text
- Fenced code blocks — monospace font on a shaded background, with
white-space: pre-wrapinstead of horizontal scrolling, since email clients handle scrollable regions inconsistently (some just clip the overflow) - Tables — inline-styled
<th>/<td>, with column alignment preserved - Horizontal rules — a simple bordered
<hr>-equivalent - Images —
<img>tags with inlinemax-width: 100%so they scale on mobile
What to Watch Out For
Images need to be hosted somewhere public
This is the one that trips people up most. A Markdown image reference — whether it’s a relative path (./chart.png), a local file, or embedded base64 data — needs to become an absolute URL pointing at a publicly reachable image host before it’ll actually display in an inbox. Most email clients either strip data URIs entirely or don’t resolve relative paths (there’s no concept of “relative to this file” once your HTML is sitting in someone’s inbox). Upload your images to your ESP’s asset host, an S3 bucket, or wherever your site serves static assets, then swap in the absolute URL. Our converter flags this with a warning banner rather than silently producing broken image tags.
Outlook’s rendering engine is a special case
Desktop Outlook (2007 through current versions, on Windows) doesn’t use a browser engine to render HTML email — it uses Microsoft Word’s layout engine. This is a long-standing, well-documented quirk of the email ecosystem, not something specific to any one converter. It means a handful of common CSS properties behave differently or are ignored outright: background images on tables often don’t render, max-width is unreliable (which is part of why fixed pixel widths are still common in email templates), and margin/padding on certain elements can collapse unexpectedly. There’s no way for a client-side converter to fully paper over this — vendor-specific conditional comments (<!--[if mso]-->) are the traditional workaround, and they’re a manual, Outlook-specific layer on top of otherwise-standard HTML. Don’t expect pixel-perfect Outlook rendering from any automated Markdown-to-email conversion, ours included; test in Outlook specifically if that audience matters to you.
Dark mode can invert your colors unpredictably
A growing share of mail clients now apply automatic dark-mode processing to emails that don’t explicitly declare their own dark-mode styles, and the results are inconsistent across clients — some invert colors, some leave images alone but darken backgrounds, some do nothing at all. If your palette depends on specific colors reading correctly (a light background behind dark text, for instance), it’s worth testing in at least one dark-mode client before sending to a large list. This is a known limitation of the underlying HTML email ecosystem, not something a single converter fixes for you.
Task list checkboxes, raw HTML, Mermaid diagrams, and footnotes
Following the same pattern as our Notion and Slack converters, a few Markdown features don’t have a clean email equivalent:
- Task list checkboxes (
- [ ]) render as plain ☑/☐ text characters, not interactive form controls — HTML checkboxes inside email are unreliable at best and blocked at worst - Raw HTML passed through your Markdown source keeps its tags but doesn’t automatically get the inline-style treatment, since the converter only styles the elements it generates itself
- Mermaid diagram fences are kept as plain, unstyled code blocks — no email client renders Mermaid, or JavaScript of any kind
- Footnote references (
[^1]) are left as literal text, since the parser doesn’t expand them
Our tool shows a warning banner for each of these when it detects them in your source, the same pattern used across our other conversion tools.
Comparison: How People Actually Solve This
| Approach | Best for | Tradeoff |
|---|---|---|
| Markdown to Email HTML converter (this tool) | Turning existing Markdown content into inline-styled HTML fast, no signup | Semantic-tag approach, not a full visual template builder |
| MJML | Building polished, multi-column marketing templates from scratch | You write MJML markup, not Markdown — a different authoring workflow, with a build step |
| Word’s “paste from Markdown” / your ESP’s rich text editor | One-off emails where you’re comfortable manually formatting | No inline-CSS control, styling is whatever the editor’s defaults are |
| Litmus / Email on Acid | Pre-send rendering verification across dozens of real email clients | Testing tools, not converters — you still need HTML to test |
| Hand-coding email HTML | Maximum control, pixel-perfect Outlook support | Slow, requires deep email-HTML expertise, easy to regress |
For content that starts life as Markdown — a newsletter issue drafted the same way you’d draft any other doc, a changelog, a docs update you’re also emailing to subscribers — the converter approach is the fastest path from draft to send-ready HTML. If you’re building a highly designed, multi-column marketing template from scratch, MJML or a dedicated email design tool is still the better starting point. And regardless of which approach you use to generate the HTML, running it through Litmus or Email on Acid before a big send is the only real way to catch client-specific rendering surprises before your subscribers do.
Using the Converter
Our Markdown to Email HTML tool takes your Markdown on one side and gives you fully inline-styled HTML on the other, plus a rendered preview so you can sanity-check the result before you leave the page:
- Paste Markdown in, get inline-styled HTML out — no
<style>blocks or CSS classes anywhere in the output - Table-based structural shell (centered, 600px wide — the standard hand-coded email template width) around styled semantic content
- Copy HTML button for pasting straight into your ESP’s HTML block, plus a Download .html option
- Rendered visual preview so you can check the result without needing to send a test email first
- Warning banners for the specific gotchas above (image hosting, task-checkbox rendering, raw HTML, Mermaid, footnotes) so you know exactly what to double check before sending
No signup, no upload — everything runs in your browser.
Related Posts and Tools
- Markdown to Email HTML converter — the tool this post covers
- Markdown Across Platforms — how Markdown behaves across GitHub, Notion, Obsidian, and Confluence
- Why Your Markdown Isn’t Rendering — troubleshooting guide covering renderer-specific quirks like the ones in this post
- Markdown to Word (DOCX): What Converts Cleanly and What Doesn’t — the same “what survives conversion” framing, for a different output format