explaingit

mjmlio/mjml

📈 Trending18,058JavaScriptAudience · developerComplexity · 2/5ActiveLicenseSetup · easy

TLDR

A markup language that compiles to HTML emails compatible across Gmail, Outlook, Apple Mail, and other clients without manual cross-client tweaking.

Mindmap

mindmap
  root((repo))
    What it does
      Markup language for emails
      Compiles to HTML
      Cross-client compatible
    How to use it
      Online editor
      Command-line tool
      JavaScript library
    Key features
      Simple tag syntax
      Automatic compatibility
      Editor plugins
    Tech stack
      JavaScript
      Node.js
    Use cases
      Email templates
      Marketing campaigns
      Transactional emails

Things people build with this

USE CASE 1

Build responsive email templates that render correctly in Gmail, Outlook, and Apple Mail without manual HTML tweaking.

USE CASE 2

Create marketing campaign emails using simple markup tags instead of writing complex, client-specific HTML.

USE CASE 3

Generate transactional emails (receipts, confirmations) programmatically from Node.js code.

Tech stack

JavaScriptNode.js

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

MJML is a markup language, a special way of writing code, specifically designed to make it much easier to create HTML emails that look correct across different email clients (such as Gmail, Outlook, and Apple Mail). Writing HTML emails by hand is notoriously painful because email clients each interpret HTML and CSS differently, often ignoring modern web standards. MJML solves this by letting you write in a simpler, more structured syntax, then automatically compiling it into the complex, compatible HTML that email clients need. You write MJML using tags like mj-section, mj-column, and mj-text, which map to layout and content concepts. The MJML engine then translates this into a finished HTML email. Because the engine handles all the cross-client compatibility logic, your email will render correctly without you needing to know the many quirks of each client. MJML can be used in three ways: through a free online editor, as a command-line tool that takes an .mjml file and outputs an .html file, or as a JavaScript library you call from Node.js code. Editor plugins are available for Visual Studio Code and Sublime Text. The project is open source.

Copy-paste prompts

Prompt 1
Show me how to write a simple MJML email template with a header, text section, and button that works across all email clients.
Prompt 2
How do I use the MJML command-line tool to convert an .mjml file to HTML and send it as an email?
Prompt 3
I want to integrate MJML into my Node.js app to generate dynamic transactional emails. What's the simplest way to do that?
Prompt 4
What are the main MJML tags (like mj-section, mj-column) and how do they map to email layout concepts?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.