Skip to main content

How to Convert Word to Clean HTML (Without the Word Cruft)

Updated 4 min readMarkdown

Paste a Word document or a Google Doc into a CMS, an email builder, or a plain HTML page and you get a horror show: hundreds of lines of mso- styles, <span>s wrapping every word, class names like c17, and font tags nobody asked for. It looks right until you open the source, or until it renders differently in an email client. Here's how to turn a document into clean, semantic HTML instead — the kind you'd write by hand.

Why "Save as HTML" from Word is the wrong tool

Word's own Save as Web Page was built to round-trip back into Word, not to publish. So it embeds everything it might need to reopen the file: Office-specific style blocks, conditional comments, VML fallbacks. Your <h1> becomes a styled <p> with a hardcoded font. Drop that into a modern site and it fights your stylesheet; drop it into an email and half the clients mangle it.

What you actually want is the structure — headings as headings, lists as lists, links as links — and none of the styling, because your site or email template already owns the look.

The clean-output approach

A good converter throws away everything Office-specific and keeps only semantic tags. A heading becomes an <h2>, a bulleted list becomes a real <ul>, bold becomes <strong>, and the mso- soup simply doesn't make it into the output. That's the job of a Word to clean HTML converter: same words, same structure, markup you can actually read and style.

If you're working from a live Google Doc rather than a .docx, the same idea applies — copy the content and run it through a Google Docs to HTML converter, and the c1/c17 class soup Docs loves to emit gets stripped down to plain tags.

Tables and images, the two things people get burned by

  • Tables: a real converter emits a proper <table> with <th> and <td>, not a grid of positioned divs. Merged cells are the one genuine limitation — HTML supports them, but they don't always survive a document's messy internal representation, so check anything with a complex header.

  • Images: decide up front whether you want them inlined as base64 (one self-contained file) or pulled out as separate assets. Base64 is convenient for a single email; separate files are better for a page you'll maintain.

Don't upload the document to do it

Most "doc to HTML" sites upload your file to a server to convert it. For a blog draft, whatever. For a client proposal, an internal memo, or an unpublished press release, that's a copy of a confidential document sitting on someone else's machine — to save a couple of minutes.

The conversion doesn't need a server. A browser can parse the document and emit HTML locally, with nothing leaving the tab. docs2html works that way — open the network panel and you'll see it stays silent, and it keeps working with your Wi-Fi off. If your target format is Markdown instead of HTML (for a README or a wiki), its sibling docs to Markdown tool does the same thing locally.

The short version

  1. Never publish Word's "Save as HTML" output — it's built to reopen in Word, not to ship.

  2. Use a converter that keeps semantic tags and drops mso- styles and class soup.

  3. Check tables with merged cells and decide how images should travel.

  4. Prefer a local, no-upload tool for anything confidential.

Clean HTML pastes into any CMS, survives email clients, and matches your own stylesheet instead of overriding it. It's the difference between content you can maintain and a block you're afraid to touch.

AAndrian2mo ago

On Postcards email builder you can import any html to email.