What is the best way of editing .mht(web archive) files?

slisnychyi picture slisnychyi · Apr 26, 2013 · Viewed 31.2k times · Source

If you faced with situation when you need to edit .mht file (for example: add some text to site).

Could you please suggest the best way of editing .mht(web archive) files?

What I've tried:

  1. (editors like: notepad, word);

  2. I-Explorer add-ons (like HTML Quick edit Bar)

Answer

zakinster picture zakinster · Apr 26, 2013

An MHTML file is a web page archive format. It is meant to be stored and viewed but not to be edited directly.

However, you can easily extract the MHTML file to a regular HTML document (with linked files), edit it with your favorite HTML editor and then export it back to an MHTML archive (including the linked files).

Since you're using Internet Explorer, note that you can open/save between HTML and MHTML files. This can effectively be used to unpack, edit and repack the MHTML archive. Google Chrome can do this as well.

You may also find software that are able to edit the MHTML file directly (doing the unpacking/repacking in the background). Microsoft Word seems to be able to do this, but depending on your document structure, it may impact the content layout.