> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# HTML to Email

> Bring an existing HTML email into Migma and convert it into a fully editable, email-safe Migma email.

Already have an HTML email, a hand-coded template, an export from another tool, or a legacy newsletter that keeps breaking in Outlook? Drop it into Migma and it becomes a fully editable, email-safe Migma email. You can keep it exactly as-is, or have it adapted to your brand automatically.

Because every import is rebuilt through Migma's email engine, importing a broken legacy template is also the fastest way to **fix** Outlook and webmail rendering problems.

## How it works

<img src="https://mintcdn.com/migmaai/fdDb3jxHlHiKoBGd/images/html-add-content-menu.png?fit=max&auto=format&n=fdDb3jxHlHiKoBGd&q=85&s=06f91c2c94334f5e5fd0940965ea40d2" alt="The plus add-content dropdown showing the HTML to Email option" title="The + add-content menu" className="mx-auto" width="800" data-path="images/html-add-content-menu.png" />

<Steps>
  <Step title="Open the add-content menu">
    In the Migma create/chat input, click the **"+"** (plus) button to open the add-content dropdown.
  </Step>

  <Step title="Choose &#x22;HTML to Email&#x22;">
    Select the menu item labeled **HTML to Email**.
  </Step>

  <Step title="Add your HTML">
    **Paste** the HTML code directly, or **drop / upload** a `.html` or `.eml` file.
  </Step>

  <Step title="Preview and import">
    Click **Preview & import**. Migma converts the source into an editable email.
  </Step>

  <Step title="Review & refine">
    Tweak in chat or the visual editor, run Email Preflight, then export.
  </Step>
</Steps>

<Tip>
  Paste is best for a quick snippet or a copied template. Upload a `.eml` when you've saved a real email out of your inbox and want the exact source.
</Tip>

<img src="https://mintcdn.com/migmaai/fdDb3jxHlHiKoBGd/images/html-import-dialog.png?fit=max&auto=format&n=fdDb3jxHlHiKoBGd&q=85&s=1586605ce3b48fb45232dae49159685d" alt="The HTML to Email import dialog showing the paste area, browse a file link, and Preview & import button" title="HTML to Email import dialog" className="mx-auto" width="800" data-path="images/html-import-dialog.png" />

***

## Two ways to import

**Exact conversion** keeps your email as-is and makes it Migma-editable and email-safe. Nothing about the design changes. Use this when the template is already the way you want it and you only need it inside Migma.

```text theme={null}
Convert this HTML into an editable Migma email exactly as-is, no design changes
```

**Brand-adapt** keeps the layout and structure but swaps in your project's colors, fonts, and logo so it matches your brand context.

```text theme={null}
Convert this HTML but apply my brand colors, fonts, and logo
```

***

## What happens under the hood

This is not a model guessing at your markup. A deterministic converter parses your HTML and rebuilds it as an editable Migma email.

That single detail is what makes the import dependable:

<CardGroup cols={3}>
  <Card title="Deterministic" icon="diagram-project">
    A parser reads your HTML and maps it to an editable Migma email. The same input produces the same output every time, no model variance.
  </Card>

  <Card title="Email engine" icon="gears">
    Every import uses the same rendering engine that powers emails built from scratch in Migma.
  </Card>

  <Card title="Email-safe output" icon="shield-check">
    The engine emits email-safe HTML for Gmail, Outlook, Apple Mail, mobile clients, and dark mode review.
  </Card>
</CardGroup>

Because everything flows through that one engine, the output renders reliably across Outlook, Gmail, Apple Mail, and mobile, and stays consistent in dark and light mode (Migma emits explicit `color-scheme` metadata). So if your original template renders fine in some clients but falls apart in Outlook, re-importing it through Migma is the fix: it comes back out as clean, email-safe HTML.

<Check>Tangled, inline-everything legacy markup becomes an editable Migma email</Check>
<Check>Quirks that break specific clients are normalized by the engine</Check>
<Check>The result is fully editable, not a flattened snapshot</Check>

***

## Fixing a broken legacy template

This is the most common reason teams reach for HTML import. The workflow:

<Steps>
  <Step title="Import the broken template">
    Paste or upload the HTML that's misbehaving in Outlook (or anywhere else).
  </Step>

  <Step title="Let the engine rebuild it">
    The deterministic converter rebuilds it as an editable Migma email.
  </Step>

  <Step title="Confirm with Preflight">
    Run Email Preflight to see it across major clients and devices before you send.
  </Step>
</Steps>

<Warning>
  Hand-coded emails often hide client-specific hacks (conditional comments, fixed pixel widths, nested tables) that work in one inbox and break in another. Migma's engine normalizes these, but always confirm the result in Email Preflight before sending to a real list.
</Warning>

***

## After import

Once your email is in Migma, it behaves exactly like one you built from scratch:

<img src="https://mintcdn.com/migmaai/fdDb3jxHlHiKoBGd/images/html-converted-result.png?fit=max&auto=format&n=fdDb3jxHlHiKoBGd&q=85&s=c13bd7405ea49589094f2987e6af7111" alt="An imported HTML email open and editable in the Migma visual editor" title="Converted result in the editor" className="mx-auto" width="800" data-path="images/html-converted-result.png" />

<CardGroup cols={2}>
  <Card title="Refine in chat" icon="comments">
    Ask for changes in plain language: "make the headline larger", "swap the hero image", "tighten the footer spacing".
  </Card>

  <Card title="Edit visually" icon="pen-to-square">
    Click into any block to adjust text, images, colors, and layout directly.
  </Card>

  <Card title="Run Preflight" icon="clipboard-check">
    Test the imported email across major clients and devices before it goes out.
  </Card>

  <Card title="Export anywhere" icon="download">
    Export clean, email-safe HTML for any ESP. No vendor lock-in.
  </Card>
</CardGroup>

***

## HTML import vs other methods

|              | HTML to Email                         | Figma to Email         | Clone from Image        | Claude Design             |
| ------------ | ------------------------------------- | ---------------------- | ----------------------- | ------------------------- |
| **Source**   | Existing HTML / `.html` / `.eml`      | Figma file             | Screenshot / mockup     | React / JSX `.zip`        |
| **Method**   | Deterministic converter               | Design analysis        | Vision + OCR            | Deterministic converter   |
| **Speed**    | Near-instant                          | 60-90 sec              | 30-60 sec               | Fast                      |
| **Text**     | Carried over exactly                  | Exact                  | OCR-based               | Carried over from design  |
| **Best for** | Migrating & fixing existing templates | Original Figma designs | Emails you can only see | Emails designed in Claude |
| **Setup**    | The HTML source                       | Figma file access      | None                    | Export the `.zip`         |

If you already have the HTML, this is the most faithful path. Your content and structure come across as-is, and you gain email-safe rendering on top. If you only have a picture of an email, use Clone from Image; if you're starting from a design file, use Figma to Email.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="My paste didn't import" icon="clipboard">
    **Cause:** Partial markup, such as a copied fragment rather than a full document.

    **Solution:** Paste the complete HTML, or save the email as a `.html` / `.eml` file and upload that instead.
  </Accordion>

  <Accordion title="Fonts look different after import" icon="font">
    **Cause:** The original used a font that isn't available across email clients.

    **Solution:** Migma maps to email-safe fallbacks automatically. To pin a specific one, ask in chat:

    ```text theme={null}
    Use Arial as the fallback for the heading font
    ```
  </Accordion>

  <Accordion title="It looked fine before but rendered differently" icon="wand-magic-sparkles">
    **Cause:** The original relied on CSS that some inboxes ignore. The engine rewrites those parts to email-safe equivalents.

    **Solution:** This is expected. The import is optimized to render reliably across clients. Confirm the result in Email Preflight, then refine anything you want to adjust.
  </Accordion>

  <Accordion title="Images are missing" icon="image-slash">
    **Cause:** The HTML referenced images by relative path or from a source that's no longer reachable.

    **Solution:** Use absolute, publicly reachable image URLs in your source, or re-add the images in the visual editor after import.
  </Accordion>
</AccordionGroup>

***

## Related

<CardGroup cols={2}>
  <Card title="Figma to Email" icon="figma" href="/creating-emails/figma-import">
    Import directly from a Figma design file.
  </Card>

  <Card title="Clone from Image" icon="clone" href="/creating-emails/image-clone">
    Recreate an email from a screenshot or mockup.
  </Card>

  <Card title="Client Compatibility" icon="envelopes-bulk" href="/email-editor/client-compatibility">
    How Migma keeps emails rendering reliably across inboxes.
  </Card>

  <Card title="Email Preflight" icon="clipboard-check" href="/email-editor/email-preflight">
    Test your imported email across major clients and devices.
  </Card>

  <Card title="Export Options" icon="download" href="/email-editor/export-options">
    Export clean, email-safe HTML for any ESP.
  </Card>

  <Card title="Claude Design to Email" icon="wand-magic-sparkles" href="/creating-emails/claude-design">
    Import a design built in Claude's design tool via React / JSX.
  </Card>
</CardGroup>
