EML Email Viewer

Open a raw .eml file and read it like an email client would, without one. The viewer parses the RFC 5322 headers — decoding encoded-word subjects and names — walks the MIME multipart tree, and decodes quoted-printable and base64 parts to recover the message. It shows a clean header block, switches between the HTML and plain-text bodies, and lists attachments with their type and size. The HTML body is rendered inside a sandboxed <iframe> with scripts disabled, and the whole parse runs in your browser so the message is never uploaded.

How to use the EML Email Viewer

Load a .eml file with the file chooser, or paste the raw message source into the box — the part that begins with From: and Subject: headers, then a blank line, then the body. The viewer parses it immediately and shows a header block at the top with the decoded From, To, Cc, Subject, Date, and Message-ID. Names and subjects that were transmitted as encoded-words (the =?UTF-8?B?…?= form used for non-ASCII text) are decoded back to readable characters.

If the message carries both an HTML and a plain-text body, a HTML / Plain toggle appears so you can switch between them; messages with only one body show that one. The HTML body is displayed inside a sandboxed <iframe> with scripting turned off, so remote tracking scripts and active content in the email cannot run or phone home — a safety measure that also makes this a reasonable way to inspect a suspicious message. Any attachments are listed below the body with their filename, content type, and decoded size. Everything is parsed with client-side JavaScript, so the example works offline and the email is never sent anywhere.

How a .eml file and MIME are put together

A .eml file is just an email saved as plain text in the format mail servers actually exchange. The structure comes from RFC 5322: a block of headers, one per line as Name: value, then a single blank line, then the body. Headers carry everything from the obvious From, To, and Subject to routing fields like Received and identifiers like Message-ID. Because that header syntax is restricted to ASCII, any non-ASCII text — an accented name, an emoji in a subject — is wrapped in an encoded-word: =?charset?B?…?= for a Base64 payload or =?charset?Q?…?= for a quoted-printable one. A reader has to decode those to show the real text.

The body is where MIME (Multipurpose Internet Mail Extensions) takes over, because a plain RFC 5322 body can only hold ASCII text. The Content-Type header declares what the body is. A multipart/* type means the body is split into several parts separated by a boundary string; multipart/alternative holds the same message as both text/plain and text/html so the client can pick, while multipart/mixed bundles the message together with attachments. Parts can nest — a mixed message often contains an alternative part inside it — so reading an email means walking a small tree, not a flat list.

Each leaf part also declares a Content-Transfer-Encoding that says how its bytes survived the trip over a text-only transport. quoted-printable keeps mostly-ASCII text legible while escaping the occasional special byte as =XX; base64 wraps binary data such as an image or PDF attachment into the safe 64-character alphabet. To recover a part you reverse that encoding, and for text you then apply its charset. Putting it together, opening an email is a sequence of steps: separate headers from body, decode any encoded-words in the headers, read the Content-Type and split on its boundary, recurse through the parts, decode each part's transfer encoding, and collect the text bodies and attachments. This viewer does exactly that, and renders any HTML body inside a sandboxed frame so the message can be read without its embedded content executing.

Common use cases

  • Reading a saved email. Open a .eml exported from a mail client when you do not want to import it back into one.
  • Inspecting headers. Check the From, Message-ID, and other fields when investigating a suspicious or spoofed message.
  • Recovering attachments. See what files an email carried, with their types and sizes, from the raw source.
  • Debugging mail output. Verify that an application built the MIME structure, boundaries, and encodings correctly.
  • Safe preview. View an HTML email in a sandboxed frame so trackers and scripts cannot run, all on your own machine.

Frequently asked questions

What does the viewer decode?

It splits headers from the body, decodes RFC 2047 encoded-words in headers like Subject and From (both the B/base64 and Q/quoted-printable forms), reads the Content-Type and boundary, walks multipart parts recursively, and decodes quoted-printable and base64 transfer encodings to recover the text bodies and attachments.

Why is the HTML body shown in an iframe?

Email HTML can contain remote images, trackers, and scripts. Rendering it inside a sandboxed iframe with scripting disabled lets you read the message while preventing active content from running or making network calls, which is important for suspicious mail.

Can it show both HTML and plain text?

Yes. When a message includes both (typically multipart/alternative), a HTML / Plain toggle appears so you can switch. If only one body is present, that one is shown and the toggle is hidden.

Does it extract attachments?

It lists attachments with their filename, content type, and decoded size, parsed from the MIME parts. The list is a summary view; the focus of the tool is reading the message and inspecting its structure.

Is my email uploaded?

No. The .eml is parsed entirely in your browser with client-side JavaScript. Nothing is transmitted to any server, so a private or sensitive message stays on your device.