An MHTML file is a single document that contains an entire webpage — text, images, links, and formatting — all bundled together in one file
When you save a webpage using your browser's "Save as" option, you often get a choice between saving it as HTML (which creates a folder full of separate files) or as MHTML (which creates one self-contained file). MHTML stands for MIME Encapsulation of Aggregate HTML Documents. The practical meaning: everything the webpage needs to display is packed into that single .mhtml file, so you can move it around, email it, or open it later without losing images or formatting.
Your browser created the MHTML file by converting all the images, stylesheets, and other resources into text-based code and embedding them directly into the document. This is why MHTML files are often much larger than the original webpage — they contain not just the text but encoded versions of every image and design element.
Key Takeaways
- An MHTML file is a webpage saved as a single file instead of a folder, with all images and formatting included inside it.
- MHTML files open in any web browser the same way a regular webpage does, without needing a separate folder of images.
- Your browser creates MHTML files when you choose "Save as" and select the MHTML or "Web Page, single file" option.
- MHTML files are larger than HTML files because they contain encoded copies of every image and design element embedded in the document.
How MHTML differs from regular HTML files
When you save a webpage as regular HTML, your browser creates a folder with two things inside: an .html file (the text and structure) and a separate folder containing all the images, stylesheets, and other resources. If you move the HTML file without the folder, the images break. If you email it to someone, you have to send the folder too, or the recipient sees a page full of broken image icons.
MHTML solves this by putting everything into one file. The images are converted into a text format called Base64 encoding and written directly into the .mhtml file alongside the HTML code. When you open the file in a browser, it decodes those images on the fly and displays them. You can move, copy, or email a single MHTML file and it works exactly the same way everywhere.
The tradeoff is file size. Because images are encoded as text rather than stored in their original format, an MHTML file is typically 20 to 40 percent larger than the original webpage would be if you saved it as HTML with a separate images folder. For a straightforward text-heavy page, the difference is small. For a page full of photographs, the MHTML file can become quite large.
Which browsers create MHTML files and how to open them
Internet Explorer and Microsoft Edge both support MHTML natively — they can save webpages as MHTML and open them without any extra software. Chrome, Firefox, and Safari do not have built-in MHTML support, though you can install browser extensions to add it. If you receive an MHTML file and your browser does not recognize it, you can usually open it by dragging it into any browser window, or right-clicking it and choosing "Open with" and selecting your browser.
If dragging does not work, try renaming the file extension from .mhtml to .html and opening it again. Some browsers treat them identically once the file is open, even if they do not officially support the MHTML format. If the file still will not open, you can convert it to a regular HTML file using free online conversion tools, though you will lose the single-file convenience.
When you might encounter MHTML files
MHTML files most often appear when you deliberately save a webpage for offline reading. You might do this to keep a record of an article, a receipt, or a form you filled out. Some websites also let you read pages as MHTML files directly, rather than making you save them through your browser.
You may also see MHTML files in email or document archives. Some email clients can save messages as MHTML, preserving the formatting and images in a single file. If you work in a field that requires keeping records of webpages — legal, medical, or financial work, for example — MHTML is sometimes used because it is harder to accidentally break the file by moving folders around.
How to save a webpage as MHTML
In Microsoft Edge, open the webpage you want to save, then press Ctrl+S (or Cmd+S on Mac). A dialog box appears asking where to save the file and what format to use. Look for a dropdown menu that says "Save as type" and select "Webpage, single file (*.mhtml)". Choose where to save it and click Save. The entire page, including all images, is now in one file.
In Internet Explorer, the process is identical: Ctrl+S, then choose "Web Page, complete (*.mhtml)" from the save type dropdown. In Chrome or Firefox, you do not have a native MHTML option in the Save dialog. Instead, you can right-click the page and look for "Save page as" or "Save as MHTML" if you have installed an extension. If neither option appears, save it as regular HTML instead — the page will work the same way, just in a folder structure rather than a single file.
Why MHTML files sometimes fail to open correctly
The most common problem is that the browser you are using does not support MHTML, or supports it only partially. Chrome, for example, can open MHTML files but may not display them perfectly if they use certain advanced web features. Firefox has similar limitations. If images are missing or the layout looks wrong, try opening the file in Microsoft Edge instead.
Another issue is that some MHTML files are created with absolute links to external resources — meaning they still try to load images or scripts from the internet rather than using the embedded versions. This usually happens if the webpage itself was designed in an unusual way. If you see broken images when you open an MHTML file offline, this is likely the cause, and there is no straightforward fix without re-saving the page.
Occasionally, an MHTML file becomes corrupted during read or transfer, especially if it was sent as an email attachment and your email client did not handle it correctly. If a file will not open in any browser, try downloading it again or asking the person who sent it to resend it.
Frequently Asked Questions
Can I edit an MHTML file?
You can open an MHTML file in a text editor and change the HTML code directly, but this is not practical for most people. The file contains a lot of encoded image data mixed in with the code, making it hard to find what you want to change. If you need to edit a saved webpage, it is easier to save it as regular HTML instead, edit the HTML file, and leave the images folder untouched.
Is it safe to open an MHTML file from someone I do not know?
MHTML files can contain the same malicious code as any webpage, so treat them with the same caution you would use for a link from an unknown source. Do not open MHTML files from strangers unless you have a good reason to trust them. Your browser will warn you if the file contains anything obviously dangerous, but that is not a complete may provide of safety.
Why is my MHTML file so much larger than the original webpage?
MHTML files are larger because images are encoded as text and embedded directly in the file rather than stored in their original compressed format. A photograph that might be 500 kilobytes as a .jpg file can become 700 kilobytes or more when encoded into MHTML. This is the price of having everything in one file — convenience costs storage space.
Can I convert an MHTML file back to regular HTML?
Yes, using free online conversion tools or by opening the MHTML file in a browser and saving it again as HTML. When you save it as HTML, your browser will extract the embedded images and create a separate folder for them. The result is the same as if you had saved the webpage as HTML in the first place.