So normally I wouldn't use this feature ("Save as Web Page") but I have large documents from clients they just want put on their site as HTML, and formatting it all by hand seems like a waste of time.

I have tried "save as webpage" in Word 2007, but it produces all sorts of bad stuff. To wit:

<b style='mso-bidi-font-weight:normal'>
<span style="mso-spacerun: yes">

as well as a large block of XML formatting info:

<!--[if gte mso 9]><xml>
 <o:Subject> </o:Subject>
 <o:Author> </o:Author>
 <o:Keywords> </o:Keywords>

As I said, formatting it all by hand seems like a waste of time, but the way MS exports currently just has too much cruft. Is there a way to export MS Word doc as html without all this?

EDIT: This document is a charter/bylaws type document and therefor has many levels of nested list. One of my criteria for "success" in this conversion endeavor is that the list hierarchy is retained, not discarded.

6 Answers 6


I know this is three years old, but I came across it looking for the same answer today, for Office 2010 anyway there is an option to save as "filtered HTML" without the extra Microsoft code :

About using filtered HTML

When you save Web pages or send e-mail messages in HTML format with Microsoft Word, additional tags are added so that you can continue to use the full functionality of Word to edit your content.

To reduce the size of Web pages and e-mail messages in HTML format, you can save them in filtered HTML so that the tags used by Microsoft Office programs are removed.

This feature is only recommended for experienced Web authors, who are concerned with the tags that appear in their HTML files.

If you reopen a Web page in Word that you saved in filtered HTML, your text and general appearance are preserved, but you may not be able to use certain Word features in the usual way to edit your files. For example, the appearance of bulleted or numbered lists is preserved; however, some of the Word functionality associated with lists will not be preserved.

When possible, you should only save a Web page in filtered HTML when you are finished editing the page in Word. However, if the underlying HTML of your Web pages is not important to you, you should save your files as a standard Web page.

If you will need to edit the file later, you can maintain two files: one in Word format and one in filtered HTML format. You can edit the content in the Word document, save it in Word format for future editing, and then save a copy in filtered HTML format.

  • Good answer, but filtered HTML still has MsoNormal CSS classes in the HTML.
    – Jess
    Feb 9, 2016 at 19:03

You can always use another application as an intermediary, like LibreOffice, and use it to save it as an HTML document.

LibreOffice (formerly OpenOffice, which is still available if you prefer it) generates much cleaner code comparatively.

  • Thank you for the suggestion! Overall the markup was better but it didn't hit my success criteria. Issues: a) didn't preserve nested lists b) tried (failed) to base64 encode an image, definitely unexpected behavior (word just makes a dir with them). c) added odd/inappropriate unicode chars, to wit:  . not sure why it did this but it's not good. Styles were much shorter than MSWord, and it looked alright overall, so there are some pros, but still a few deal breaking issues. Mar 10, 2011 at 19:33

I has been a while since I've done this, but I believe that Google Doc's export to HTML works better than MS Word and I believe that Google Docs will read Word docs, so you might be able to load the doc into Google Docs and export it that way.

  • Tried it but the lists became broken on "Download as HTML" i.e. it did not preserve the hierarchy and made a bunch of extra lists. This is odd, because it had the lists nested properly within google docs, it only broke on export. Mar 10, 2011 at 19:00

There are some good answers in this What is the best free way to clean up Word HTML?

with HTMLTidy coming out on tops

  • I don't think this will work in this case because the HTML is too far gone. The list hierarchy has been basically totally discarded in favor of some strange <![if !supportLists]> stuff with nonbreaking spaces for indentation. I don't think tidy can bring it back from this point. Good tip tho, generally speaking! Thank you! Mar 10, 2011 at 19:04

I found a way that seems to work 100%:

  1. Use the old app MS Front Page
  2. Go to "Design Mode" (lower left corner on a blank page)
  3. Paste text copied from MS Word
  4. Switch to "Code Mode" and you will have clean HTML code
  5. You can save it from there as HTML if needed

Try saving the Word document to an RTF format, then exporting that to HTML. Hopefully the RTF document wouldn't contain all of that complexity required in the Word document and will lead to simpler HTML.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.