MJML Subset Compiler: Responsive Email Markup to Table-Based HTML

A small compiler for the most used MJML tags that outputs responsive, table-based email HTML.

Use the tool

Why this tool exists

MJML lets you write email layouts in short tags. The official compiler is a large library; this page contains a small hand-written one for the common tags.

It supports mj-head with title, preview, style and attributes, plus mj-body, mj-section, mj-column, mj-text, mj-image, mj-button, mj-divider and mj-spacer with their usual attributes. Columns sit side by side above 480px and stack below it. It does not produce Outlook (MSO) conditional tables, so Outlook desktop may render columns differently. Test before sending.

How to use it

  1. Paste MJML wrapped in mjml and mj-body.
  2. Read the compiled HTML and preview.
  3. Check the notes for unsupported tags.
  4. Test in your target email clients.

Frequently asked questions

Is the output identical to MJML?

No. It follows the same ideas but is not byte-for-byte the same.

What is not supported?

Other mj- components, mj-include, mj-wrapper, mj-group and Outlook ghost tables.

Will it work in Gmail?

The output uses inline styles and tables, which Gmail handles, but always send a test.