mjmlio /mjml

MJML: the only framework that makes responsive email easy

★ 18,294⑂ 1,009👁 160⑃ 948● 2,124▤ 128
JavaScriptMITCreated 2016-01-28mjml.io
下载:v5.4.1v5.4.1 ↓5.4.12026-09-10
-1
日增长
+12
周增长
+27
月增长
18,294
stars
1,009
forks
160
watchers
948
prs
2,124
issues
128
releases

README

Developed by

  
    
  


---


  
    
  




  | Introduction
  | Installation
  | Usage |


---

 Introduction

MJML is a markup language created by Mailjet and designed to reduce the pain of coding a responsive email. Its semantic syntax makes the language easy and straightforward while its rich standard components library shortens your development time and lightens your email codebase. MJML’s open-source engine takes care of translating the MJML you wrote into responsive HTML.


  
    
  



 Installation

You can install MJML with NPM to use it with NodeJS or the Command Line Interface. If you're not sure what those are, head over to Usage for other ways to use MJML.

bash
npm install mjml


 Development

To work on MJML, make changes and create pull requests, download and install yarn for easy development.

bash
git clone https://github.com/mjmlio/mjml.git && cd mjml
yarn
yarn build


You can also run yarn build:watch to rebuild the package as you code.

 Usage

 Online

Don't want to install anything? Use the free online editor!


  


 Applications and plugins

MJML comes with tools and plugins, check out:
- Visual Studio Code plugin (MJML is included). Also available at Visual Studio Code Marketplace and the Open VSX Registry or in the extensions tab of the Visual Studio Code app.
- Sublime Text plugin (MJML needs to be installed separately)

For more tools, check the Community page.

 Command line interface

 Compiles the file and outputs the HTML generated in output.html

bash
mjml input.mjml -o output.html


You can pass optional arguments to the CLI and combine them.

| argument                         | description                                            | default value |
| -------------------------------- | ------------------------------------------------------ | ------------- |
| mjml [input] -o [output]       | Writes the output to [output]                          |               |
| mjml [input] -s                | Writes the output to stdout                          |               |
| mjml [input] -s --noStdoutFileComment | Writes the output to stdout without file comment in the first line |               |
| mjml -w [input]                | Watches the changes made to [input] (file or folder) |               |
| mjml [input] --config.allowIncludes | Enables mj-include processing (true or false) | false |
| mjml [input] --config.allowMixedSyntax | Allows mixing block and CSS variable syntax when sanitizeStyles is enabled (true or false) | false |
| mjml [input] --config.beautify | Beautifies the output (true or false)              | true        |
| mjml [input] --config.includePath | Adds allowlisted include root(s), as a string path or JSON array of paths |               |
| mjml [input] --config.minify   | Minifies the output (true or false)                | false       |
| mjml [input] --config.minifyOptions | Options for HTML minifier, use minifyCss to control CSS minification | See mjml-cli documentation |
| mjml [

Top issues

Discussions

Latest release

v5.4.1 v5.4.1 2026-09-10
What's Changed

 Fixes
 Fix crash in strict validation when an mj-include is denied by @sarmah-rup in https://github.com/mjmlio/mjml/pull/3115

 Dependencies
  Address various dependency vulnerabilities by @dazgreer in https://github.com/mjmlio/mjml/pull/3133

 Docs
 Note that templating tags break with mj-html-attributes by @Hashim1999164 in https://github.com/mjmlio/mjml/pull/3118
 Add Emjay Ruby port with MJML 5.4 feature parity by @julik in https://github.com/mjmlio/mjml/pull/3131
 Add Templatical to community contributions by @orkhanahmadov in https://github.com/mjmlio/mjml/pul

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON