Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>EML Viewer ProNew to Visual Studio Code? Get it now.
EML Viewer Pro

EML Viewer Pro

TheTechGuy86

|
9 installs
| (0) | Free
View .eml email files with accurate Outlook HTML rendering, headers, attachments, and MIME structure. Scripts and remote images blocked by default.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

EML Viewer Pro

View .eml email files directly in VS Code.

Open any .eml file as a readable message (rendered body, headers, attachments, and MIME structure) instead of a wall of raw source. No mail client, no import step, and nothing uploaded to a web tool.

Rendering is tuned for Outlook-generated HTML, which is where most viewers fall down: MSO conditional comments, VML graphics, inline CID-referenced images, and deeply nested table layouts are handled rather than mangled.

What is a .eml file?

A .eml file is a single email message saved to disk in the standard MIME format (RFC 5322), the same format mail servers use in transit. Outlook, Thunderbird, Apple Mail, and most webmail clients can all export one. Inside is the message's headers, its plain-text and HTML bodies, and any attachments, all encoded as text.

They usually turn up when someone forwards a message for inspection, when a mail flow rule quarantines something, or when you export a message to attach to a ticket. Opening one in a plain editor shows encoded MIME source rather than the message.

Features

  • Read the message. The body renders as it would in a mail client, with inline images resolved and CSS preserved.
  • See everything around it. Subject, from/to/cc, the full header list, attachments with sizes and content types, and the nested MIME tree, all in one view.
  • Read the source when you need to. The original HTML and its <style> blocks are one pane away.
  • Save what you need. Export the HTML, the attachments, or a complete self-contained package of the whole message.
  • Safe by default. Scripts and other active content are always removed, remote images are blocked until you ask for them, and the message renders in a sandboxed frame. See Privacy and security.

For people who build email templates

The same view doubles as a template-debugging surface:

  • Preview as Chrome, Edge, Outlook Desktop, or Outlook Web. Best-effort approximations showing which CSS a given client would drop.
  • Dark-mode simulation approximating Outlook's automatic colour inversion, so you can see what it does to a template before a customer does.
  • Diagnostics for broken images, missing or orphaned cid: attachments, external image references, invalid HTML, Outlook compatibility problems, missing alt text, low-contrast text, and oversized attachments, shown in an in-editor pane and in the native Problems panel.

Getting started

Install from the Marketplace, then open any .eml file. That's it: the extension registers as the default editor for .eml, so double-clicking one in the Explorer opens the message view.

To open a single file as plain text instead, right-click it → Open With… → Text Editor.

Commands

All commands need an EML Viewer Pro tab focused. Run them from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).

Command What it does
EML Viewer: Open MIME Tree Opens a text outline of the MIME structure in a new tab.
EML Viewer: Extract HTML Opens the raw HTML body in a new tab.
EML Viewer: Extract Text Opens the plain-text body in a new tab.
EML Viewer: Validate Email Runs diagnostics and summarises errors and warnings.
EML Viewer: Export HTML Saves a portable HTML file with relative attachments/ paths.
EML Viewer: Export Attachments Saves every attachment to a folder you choose.
EML Viewer: Export Complete Package Writes <name>-package/ containing email.html, attachments/, and metadata.json.
EML Viewer: Toggle Dark Mode Toggles the Outlook dark-mode simulation. This is not a VS Code theme toggle.

Settings

Setting Default Description
emlInspector.privacy.loadRemoteImages false Load remote images automatically for every message. Off by default (see below). When off, each message offers a one-time Load images action.
emlInspector.limits.maxFileSizeMB 50 Largest .eml that will be opened. Larger files are refused before being read.
emlInspector.diagnostics.largeAttachmentThresholdKB 1024 Per-attachment size at which the diagnostic fires.
emlInspector.diagnostics.aggregateSizeWarningMB 10 Total message size at which the diagnostic fires.

Privacy and security

.eml files often arrive precisely because something about them is suspicious, so every message is treated as untrusted.

  • Remote images are blocked by default. A remote image is effectively a read receipt: loading it tells the sender the message was opened, when, and from which IP address. When a message references remote content, the preview says so and offers a Load images action that applies to that message only and is not remembered.
  • Active content is always removed, and this cannot be switched off: <script>, <iframe>, <object>, <embed>, <base>, <form>, on* handlers, javascript: and vbscript: URLs (including control-character-obfuscated variants), ping beacons, meta refresh, and remote stylesheets in both <link> and @import form.
  • The message renders in a sandboxed frame with scripting disabled entirely, behind a restrictive content security policy.
  • Nothing leaves your machine. The extension makes no network requests of its own and collects no telemetry.

One thing worth knowing: exported HTML keeps its remote images, because they are part of the message you asked to export. Opening an exported file in a browser can therefore contact the sender's server. Active content is still stripped from exports.

Known limitations

  • VML is never pixel-rendered. It is detected, preserved in the source view, and flagged in diagnostics, but Chromium (the engine behind VS Code's webviews) has no VML renderer. This is a platform limitation, not a shortcut.
  • "Preview as" modes are approximations, not real rendering engines. They apply a rule table of known-unsupported CSS plus MSO conditional-comment filtering; there is no way to embed the real Word rendering engine or a live OWA instance.
  • Contrast and HTML validity checks are best-effort, using a nearest-ancestor background walk rather than a full CSS cascade, and a curated set of structural checks rather than exhaustive HTML5 conformance.
  • No network checks. External image references are reported, never fetched to verify them.

Requirements

VS Code 1.90.0 or newer. Nothing else. The extension ships pre-built.

License

MIT. Bundled dependency licenses are reproduced in THIRD-PARTY-NOTICES.txt, included with the extension.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft