Email MJML Preview
Write and preview MJML email templates in real time. Switch between mobile (375px) and desktop viewports, insert common MJML snippets, and export the compiled HTML ready to send. Includes newsletter, transactional, and promotional starter templates.
Frequently Asked Questions
What is MJML?▼
MJML (Mailjet Markup Language) is an open-source HTML email framework designed to make responsive email coding easy. Instead of writing complex HTML tables and inline styles from scratch, you write semantic MJML components like <mj-section>, <mj-column>, and <mj-text> — and MJML compiles them to battle-tested, cross-client HTML. It's the most popular email templating framework with 50,000+ GitHub stars.
Why do emails need special HTML like MJML?▼
Email clients (Outlook, Gmail, Apple Mail, Yahoo) have notoriously inconsistent CSS and HTML support. Outlook uses the Word rendering engine, which doesn't support flexbox, grid, or many modern CSS properties. Gmail strips <head> styles. Mobile clients need different layouts than desktop. MJML abstracts all of this — it generates responsive, table-based HTML that renders correctly across 90+ email clients automatically.
What is the difference between minAvailable and mobile/desktop preview?▼
The desktop preview shows the email at full container width (typically 600px, which is the standard for email width). The mobile preview shows it at 375px, simulating an iPhone SE/14 viewport. MJML's generated HTML includes media queries and fluid layouts that automatically restack columns to single-column on mobile.
What are the core MJML components?▼
<mj-section> is the row wrapper, always inside <mj-body>. <mj-column> is the column inside a section — multiple columns create a multi-column layout. <mj-text> renders text with font and color attributes. <mj-button> creates a CTA button. <mj-image> for images. <mj-divider> for horizontal rules. <mj-table> for HTML tables. All live inside <mjml><mj-head> (metadata) and <mj-body> (content).
How do I use MJML in production?▼
In Node.js projects: npm install mjml, then const { html } = mjml2html(mjmlString). For build pipelines, use the mjml CLI: mjml input.mjml -o output.html. For transactional emails, services like Mailjet, SendGrid, and Postmark have native MJML support. The generated HTML should be inlined (use a CSS inliner) before sending — tools like juice or premailer handle this automatically.
What is the recommended email width?▼
600px is the universal standard for email content width. This ensures readability in a two-pane email client (like Outlook with a sidebar) and on most desktop monitors. The actual email container is often wider, but the content table is constrained to 600px with margin: auto. On mobile, MJML automatically adjusts to 100% viewport width.
Related Products
on GumroadTypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →DevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →DevPlaybook Interview Vault
210+ real technical interview questions with model answers, asked at Google, Meta, Amazon, Microsoft, Stripe, and Shopify. Covers Frontend (55), Backend (55), System Design (50), and DSA (50). Available in English and Traditional Chinese.
Buy on Gumroad →You Might Also Need
HTML to Markdown Converter
Convert HTML to Markdown instantly. Supports headings, bold, italic, links, images, lists, tables, code blocks, and blockquotes. Free online tool, runs in your browser.
Open free tool →
HTML Entity Encoder / Decoder
Encode HTML special characters to entities and decode HTML entities back to text. Convert < > & " and 50+ named entities. Free, runs in browser.
Open free tool →
HTML Formatter & Minifier
Format messy HTML with proper indentation or minify it to reduce file size. Handles void elements, pre/script blocks, and nested tags. Runs entirely in your browser.
Open free tool →
More Free Tools
Related Articles
TypeScript 5.5 New Features: Complete Guide for Developers 2026
Everything you need to know about TypeScript 5.5: inferred type predicates, isolated declarations, JSDoc @import tag, new Set methods, and performance improvements. With practical code examples.
Best Tailwind CSS Tools and Resources for Developers in 2026
The complete guide to Tailwind CSS tools in 2026. Component libraries, UI generators, VS Code extensions, playground tools, and cheatsheets that make building with Tailwind faster and more productive.
Markdown to HTML: Best Free Tools and How They Work
Discover the best free Markdown to HTML converters in 2026. Learn how the conversion works, which tools to use for different contexts, and how to preview and export Markdown as HTML.
CSS-in-JS vs Tailwind CSS vs CSS Modules: Which to Choose in 2025?
An honest comparison of CSS-in-JS (styled-components, Emotion), Tailwind CSS, and CSS Modules in 2025 — covering developer experience, performance, bundle size, team scalability, and when each approach wins.
HTML/CSS/JavaScript Fundamentals: The Core Every Developer Must Know in 2026
Essential HTML semantics, CSS specificity, JavaScript async patterns, event loop, and DOM performance techniques that separate senior developers from juniors in 2026.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →