Loading converter...

HTML to MJML Converter

Convert existing HTML email markup into cleaner MJML sections so you can refactor legacy templates into a more maintainable email workflow.

Step 1

Paste Your HTML Email

Start with an existing HTML email template, newsletter, or transactional message. If you are migrating old markup into MJML, the goal is usually to replace low-level table-heavy code with more maintainable email components.

-
Paste complete HTML email markup or just the email body from your HTML source.
-
Upload an `.html` file from your project, CMS, or ESP export.
-
Use the sample email to see how the converter restructures content into MJML-friendly building blocks.

Example: Newsletter Block to MJML

A simple HTML email section converted into editable MJML text and button blocks.

HTML Input
<div style="max-width:600px;margin:0 auto;padding:24px;background:#ffffff;">
  <h1>Weekly product update</h1>
  <p>Your latest analytics export is ready.</p>
  <a href="https://jsontotable.org/dashboard">Open dashboard</a>
</div>
MJML Output
<mjml>
  <mj-body background-color="#f4f4f5">
    <mj-section background-color="#ffffff" padding="0 0 16px 0">
      <mj-column>
        <mj-text font-size="32px" font-weight="700" padding="0 0 12px 0">Weekly product update</mj-text>
        <mj-text font-size="16px" line-height="24px" padding="0 0 12px 0">Your latest analytics export is ready.</mj-text>
        <mj-button href="https://jsontotable.org/dashboard" background-color="#111827" color="#ffffff" padding="0 0 16px 0">Open dashboard</mj-button>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>
Step 2

Review the MJML Structure

The tool converts common content blocks into `mj-section`, `mj-column`, `mj-text`, and `mj-button` blocks so the result is easier to maintain than raw email HTML.

-
Headings and paragraphs become `mj-text` blocks with clearer spacing.
-
Links and buttons are mapped into email CTA output that is easier to edit later.
-
Lists and tables are preserved in a baseline format you can refine manually before production use.
Step 3

Copy, Download, and Refine

Use the generated MJML as a starting point for long-term maintenance and responsive email development. In most workflows, you will still review the final structure against the official `mj-body` reference before compiling and sending.

-
Copy the MJML into your email codebase.
-
Download the result as an `.mjml` file for cleanup and version control.
-
Review advanced layouts, background images, and edge-case email markup manually before production sends.

Frequently Asked Questions

Does this replace a full MJML migration workflow?

It gives you a strong starting point for common email markup, but complex layouts and custom styling still need review before production use. The official MJML documentation is still the source of truth for advanced patterns.

Will tables and buttons be preserved?

Yes. The converter keeps common email structures like tables, images, text, dividers, and CTA-style links in the output where possible, then maps them into editable MJML-oriented blocks where that makes sense.

Is this useful for legacy email templates?

Yes. This is especially useful when you have older HTML emails and want to move them into a more maintainable MJML workflow.

Is the conversion private?

Yes. The conversion runs in your browser, so your template content is not sent to a server.