Skip to content

EML to HTML converter

EML to HTML parses one MIME message and wraps selected headers above either the HTML body or a preformatted text fallback.

  • Converted with Mail engine · input deleted within 24 h
  • Free: 5 conversions a day · 5 MB each
  • Higher limits →

From real runs

What you get — and what changes

  • Subject header Kept

    The RFC 2047 encoded subject decoded to Q3 report – café approval and was also used as the HTML title.

  • From and To headers Kept

    From rendered as Dana Álvarez <dana@example.test>, and multiple To recipients were comma-joined with names and addresses.

  • Cc header Lost

    The test message included Legal Reviewer in Cc, but the generated header table still listed only Subject, From, To, and Date.

  • Date header Changed

    The message date was normalized to an ISO timestamp such as 2026-09-10T16:45:00.000Z.

  • Multipart alternatives Changed

    When both text and HTML parts existed, the HTML output used the HTML body rather than the plain text fallback.

  • Quoted-printable text Kept

    Quoted-printable UTF-8 in the subject and body decoded correctly, including the café accent.

  • Inline CID images Changed

    The img tag with src cid:logo123 stayed in the HTML, but the image MIME part was not embedded or rewritten as a data URL.

  • Unsafe HTML Changed

    The sanitizer removed script, iframe, object, embed, onclick, and changed the javascript link href to #.

  • Attachments Lost

    The attached notes.txt MIME part did not appear in the generated HTML and no attachment manifest was written.

Sample conversions

Repository sample EML

Input
Plain-text sample.eml with From, To, Subject Re: invoice 4471, Date, and a short approved-invoice message body.
Output
647-byte HTML document with a header table, ISO date, Dana <accounts@northwind.example>, billing@example.com, and the text body wrapped in a pre element.

Multipart approval email

Input
Hand-built multipart EML with RFC 2047 subject, text and HTML alternatives, Cc, quoted-printable café text, CID PNG image, unsafe HTML tags, and notes.txt attachment.
Output
850-byte HTML document with decoded subject, formatted From and comma-joined To headers, sanitized body table, cid:logo123 still present, Cc omitted, and attachment omitted.

A real EML → HTML run

We converted our EML sample (299 B) with Mail engine on 2026-09-11. It took 1 ms and produced a 647 B HTML file, 2.2× larger than the input. The engine raised no warnings.

Input · sample.eml · 299 B

299 bytes

Output · sample.html · 647 B

Standalone document with 0 headings, 0 paragraphs, 1 table, 0 links, 0 images

Headings
0
Paragraphs
0
Tables
1
Links
0
Images
0
Standalone document
yes

First lines of the output

html
<!doctype html>
<html><head><meta charset="utf-8"><title>Re: invoice 4471</title></head><body><table><tr><th style="text-align:left;padding-right:1rem">Subject</th><td>Re: invoice 4471</td></tr><tr><th style="text-align:left;padding-right:1rem">From</th><td>Dana &lt;accounts@northwind.example&gt;</td></tr><tr><th style="text-align:left;padding-right:1rem">To</th><td>billing@example.com</td></tr><tr><th style="text-align:left;padding-right:1rem">Date</th><td>2026-09-08T14:02:00.000Z</td></tr></table><hr><pre>Hi team,

Confirming invoice #4471 was approved today. Payment will go out with Friday's run.

Thanks,
Dana
</pre></body></html>

Do it yourself

Python email module

bash
python - <<'PY'
from email import policy
from email.parser import BytesParser
msg = BytesParser(policy=policy.default).parse(open('message.eml','rb'))
body = msg.get_body(preferencelist=('html','plain')).get_content()
open('message.html','w',encoding='utf-8').write(body)
PY

Add your own header rendering, HTML sanitization, CID image handling, and attachment inventory if the output leaves a trusted system.

EML to HTML by API or MCP

The HTTP API and the MCP server run the exact engine this page uses (Mail engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=eml&to=html.

curl
curl -X POST https://filetypeconverters.com/api/v1/convert \
  -H "Authorization: Bearer $FTC_API_KEY" \
  -F "file=@input.eml" -F "from=eml" -F "to=html" \
  --output output.html
API reference

When this is the wrong conversion

  • If you need a printable record, use /convert/eml-to-pdf after reviewing the current mail rendering limits.
  • If attachment names and bytes must be preserved, keep the original EML or use a mailbox export tool instead of HTML.
  • If Cc must be visible in the converted page, preserve the original EML until the header renderer includes it.

EML to HTML questions

Does EML to HTML decode encoded subjects?

Yes. The RFC 2047 subject in the tested email decoded to Q3 report – café approval and appeared in the title and header table.

How are From and To addresses formatted?

The retest showed display names and mailbox addresses, such as Dana Álvarez <dana@example.test>. Multiple To recipients were comma-joined in the header table.

Are CID images embedded into the HTML?

No. The tested CID image stayed as an img src pointing at cid:logo123, and no matching image file was emitted beside the HTML.

Is the generated HTML sanitized?

Yes for the unsafe constructs we retested. Script, iframe, object, embed, onclick, and javascript URL input were stripped or neutralized before the HTML was returned.