# What Is MHTML (.mht, .mhtml)? — Single-File Web Pages, and Where They Fail

Canonical: https://commareports.com/glossary/mhtml
Published: 2026-11-12

> MHTML is a web page and all its resources packed into one MIME multipart file (.mht or .mhtml). How it works, which browsers open it, why it won't open on phones, from a server or in Firefox, and the portable alternative.

# MHTML

**MHTML (MIME HTML) is a format for saving a web page and every resource
it needs — stylesheets, images, scripts, fonts — as a single file, using
the MIME `multipart/related` structure from email.** It is defined in
RFC 2557 (1999). Files end in `.mht` or `.mhtml`.

## How it works

An MHTML file is literally an email-shaped message:

```
From: <Saved by Blink>
Subject: Test report
MIME-Version: 1.0
Content-Type: multipart/related; type="text/html"; boundary="----MultipartBoundary--abc"

------MultipartBoundary--abc
Content-Type: text/html
Content-Location: https://example.com/report/

<!DOCTYPE html><html>…<link rel="stylesheet" href="style.css">…

------MultipartBoundary--abc
Content-Type: text/css
Content-Location: https://example.com/report/style.css

body { font-family: system-ui }
```

Each part carries a `Content-Location`. When the browser renders the HTML
part and meets `style.css`, it resolves the URL and serves the matching
part from inside the archive instead of the network. Binary parts are
base64-encoded, which costs about a third more bytes — the same tax as a
[data URI](/glossary/data-uri).

## Who makes it

- **Chrome and Edge:** Save as → _Webpage, Single File_ (`.mhtml`).
- **Internet Explorer** originated it as _Web Archive, single file_
  (`.mht`).
- **Microsoft Word and Excel:** _Single File Web Page_ (`.mht`) — one
  reason old intranet reports still arrive in this format.
- **Safari** does not; its single-file format is `.webarchive`, a property
  list that only Safari reads.

## Where it fails

MHTML solves "keep it as one file" and then works almost nowhere else:

| Opened from                        | Result                              |
| ---------------------------------- | ----------------------------------- |
| Chrome / Edge, local file, desktop | Renders                             |
| Firefox                            | Not supported without an extension  |
| Safari                             | Not supported                       |
| iPhone or Android                  | No app renders it                   |
| Served from a website over HTTPS   | Downloaded or refused, not rendered |
| Email attachment preview           | Shown as text, or as a download     |

The server case is deliberate. An archive can contain parts whose
`Content-Location` claims any URL, so rendering a downloaded MHTML as if
it were those pages would be a spoofing hole. Chromium only renders MHTML
from a local file.

That rules it out as a way to share a report: you can't host it, phones
can't open it, and half of desktop browsers can't either.

## The portable alternative: self-contained HTML

The goal MHTML is chasing — one file, nothing missing — is reached more
portably by a [self-contained HTML file](/glossary/self-contained-html):
CSS in `<style>`, scripts in `<script>`, images and fonts as `data:` URIs.
It is still ordinary HTML, so every browser on every device opens it, and
it can be served from a URL.

To convert an `.mhtml`:

1. Open it in Chrome or Edge on a desktop.
2. Save as → **Webpage, Complete**. You get `page.html` plus `page_files/`.
3. Drop both into the free [HTML inliner](/tools/html-inliner) to fold
   them into one `.html`.

Or skip the file entirely: drop the folder into
[Comma](https://commareports.com/) and send a link that opens on any
browser, phone included.

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.

**[Turn a report into a link →](https://commareports.com/)**

### Related

- [Self-contained HTML](/glossary/self-contained-html) · [Data URI](/glossary/data-uri)
- [HTML inliner](/tools/html-inliner) — fold a report folder into one file
- [Open an HTML file on Android](/open-html-file-on-android) · [on iPhone](/open-html-file-on-iphone)
- [Outlook blocked an HTML attachment](/fix/outlook-blocked-html-attachment)
