An MHTML file is a single document that holds an entire webpage — text, images, links, and styling — all bundled together in one file

When you save a webpage as MHTML (MIME HTML), your browser captures everything that makes that page look and work the way it does, then packages it into a single file with the .mhtml extension. Instead of getting a folder full of separate image files and a separate HTML document, you get one file that contains all of it. Open that file in a browser months or years later, and the page looks exactly as it did when you saved it.

MHTML is useful when you need to preserve a webpage exactly as it appeared, send a complete webpage to someone else, or keep a record of something online that might change or disappear. It is different from a PDF because it remains interactive — links still work, and you can select and copy text more easily than you can from a PDF.

Key Takeaways

  • MHTML files contain an entire webpage in a single document, including all images, text, and styling information.
  • Most modern browsers can open MHTML files directly, though some require you to save them with a .mht extension instead.
  • You create an MHTML file by using your browser's "Save As" option and choosing the MHTML or "Web Page, Complete" format.
  • MHTML files are larger than regular HTML files because they include all the images and resources embedded inside them.

How MHTML files are created and what they contain

When you save a webpage as MHTML, your browser reads the original HTML code and every resource the page needs — images, stylesheets, fonts, and scripts — and combines them into one file. The file itself is still text-based, but the images and other resources are encoded as text strings inside it. This encoding makes the file larger than the original webpage would be if downloaded normally, but it means everything stays together.

The MHTML format uses MIME encoding, the same standard that email uses to attach files. This is why MHTML files are sometimes called "web archives" — they archive the entire page in a way that any browser or email client can theoretically read. Different browsers may handle MHTML slightly differently, but the basic principle is the same: one file, everything inside.

Opening an MHTML file in your browser

Most modern browsers — Chrome, Firefox, Edge, and Safari — can open MHTML files directly. The simplest method is to drag the .mhtml file into your browser window, or right-click the file and choose "Open With" and select your browser. The page should load and look exactly as it did when you saved it.

If dragging does not work, open your browser and use File > Open (or Ctrl+O on Windows, Command+O on Mac), then navigate to the MHTML file and select it. Some older versions of Firefox may not open MHTML files natively, but you can install an extension like UnMHT to handle them. If your browser does not recognize the file, try renaming the extension from .mhtml to .mht — some browsers prefer the shorter extension.

Saving a webpage as MHTML

To save a webpage as MHTML in Chrome or Edge, right-click anywhere on the page and select "Save As." A dialog box opens. Near the bottom, you will see a dropdown menu that says "Save as type" or "Format." Click that dropdown and look for "Webpage, Complete" or "MHTML" — the exact wording depends on your browser version. Choose that option, give the file a name, pick where to save it, and click Save.

In Firefox, the process is similar: go to File > Save Page As, and in the "Save as type" dropdown, select "Web Page, Complete (*.html, *.htm)." Firefox does not natively support MHTML, so this option saves the page as HTML with a separate folder of resources instead. If you specifically need MHTML format in Firefox, you will need to install an extension.

Safari on Mac does not have a built-in MHTML option. Instead, use File > Save As and choose "Page Source," which saves the HTML code only, or use a third-party tool if you need the complete MHTML format with embedded images.

When MHTML files are useful

MHTML is most useful when you need to preserve a webpage exactly as it appeared on a specific date. If a website changes its design, removes a page, or goes offline, an MHTML file you saved earlier keeps that version intact. Researchers, journalists, and legal professionals often use MHTML to create timestamped records of online content.

MHTML is also practical for sharing. If you want to send a colleague a webpage with all its images and formatting, you can send one MHTML file instead of asking them to visit a link or sending multiple files. The recipient can open it in any browser without needing an internet connection.

Email is another common use. Some email clients can attach MHTML files, and the recipient can open them as a complete webpage. This is more reliable than copying and pasting HTML into an email, which often breaks formatting.

File size and storage considerations

MHTML files are typically larger than the original webpage because all images and resources are encoded and stored inside the single file. A webpage that loads quickly online might become a 5 to 10 megabyte MHTML file, depending on how many images it contains. This is not a problem for most uses, but if you are saving many webpages, the storage adds up.

If file size is a concern, a PDF is often a better choice — PDFs compress images more efficiently and are smaller. However, MHTML preserves interactivity and text selectability better than PDF, so the choice depends on what you need the saved page to do.

Troubleshooting MHTML files that will not open

If a browser will not open your MHTML file, the most common fixes are renaming the extension from .mhtml to .mht, or trying a different browser. Chrome and Edge handle MHTML most reliably. If you are using Firefox and the file will not open, install the UnMHT extension from the Firefox Add-ons store, then right-click the MHTML file and select "Open with UnMHT."

If the file opens but looks broken — images are missing or the layout is wrong — the file may have been corrupted during download or transfer. Try saving the webpage again. If you received the MHTML file from someone else and it will not open in any browser, ask them to resave it or provide the file in a different format.

Frequently Asked Questions

Can I edit an MHTML file after I save it?

Technically yes, but it is not practical. MHTML files are text-based, so you can open them in a text editor, but the images are encoded as long strings of characters. Making changes requires understanding MIME encoding. It is easier to save the webpage again or edit the original HTML file if you have access to it.

Is MHTML the same as HTML?

No. HTML is just the code that structures a webpage. MHTML bundles the HTML code together with all the images, stylesheets, and other resources in one file. An HTML file alone cannot display images or styling unless those resources are in separate files in the same folder.

Will an MHTML file work if I move it to a different computer?

Yes. Because everything is contained in one file, you can move or email an MHTML file to any computer and open it in any modern browser. You do not need the original website to be online or any other files to be present.

What is the difference between MHTML and MAFF?

MAFF (Mozilla Archive Format) is Firefox's own webpage archive format. MHTML is more widely supported across browsers. If you need maximum compatibility, MHTML is the better choice. MAFF files only open reliably in Firefox.

Can I convert an MHTML file to PDF?

Yes. Open the MHTML file in your browser, then use the browser's print function (Ctrl+P or Command+P) and choose "Save as PDF" instead of printing to a printer. This converts the webpage to PDF while preserving the layout.