Skip to content

Your document

Paste from Word or Google Docs, or open a .docx file

HTML code

Paste from Word or Google Docs on the left

or open a .docx file. The clean HTML shows up here.
Nothing to convert yet

Word to HTML Converter – Clean HTML from Word and Google Docs

What is a Word to HTML Converter?

It turns a Word document into HTML you can put on a web page. You paste from Word (or open the .docx file), and you get the same headings, bold text, lists, tables and links as plain tags like <h2>, <strong>, <ul> and <table>.

The tricky part is the cleanup. When you copy from Word, it hands the browser a lot of extra code meant for Word itself: class="MsoNormal" on every paragraph, mso- styles, hidden comments, empty <o:p> tags, and bullets that are really just a "·" character in a Symbol font. This tool removes all that and keeps what a website needs. It works the same for Google Docs, LibreOffice and web pages, and it all runs in your browser.

Only have plain text? The Text to HTML converter is the simpler sibling of this page: a paste there keeps just the words.

How to Convert Word to HTML – Step by Step

Click Sample in the tool above to see a short report that was copied from Word.

Step 1 Paste from Word or Google Docs

In Word, select the part you need (or press Ctrl+A for everything) and copy it. Click in the editor on this page and press Ctrl+V (⌘+V on a Mac). The status line under the editor tells you where the paste came from and how many Word styles and tags were cleaned up.

Want only the words, without any formatting? Press Ctrl+Shift+V instead and the paste comes in as plain paragraphs.

Step 2 Or Open the .docx File

Click Open .docx or drag the file onto the page. Opening the file is the better choice when your document has pictures: they come along as data: URIs, which means the image is written right into the HTML and you don’t need to upload it anywhere. The status line shows how much the images add.

  • Files up to 20 MB work. Big pictures make big HTML, so check the size before you use it in an email.
  • Notes: if part of the file couldn’t be converted, a yellow note says what, like "Some Word styles had no HTML match and were kept as plain paragraphs".

Step 3 Fix Anything You Like

The left panel is a real editor. Turn a line into a heading, fix a typo, add a link (Ctrl+K), or use the table button to add rows and columns, merge cells or switch the header row on. The HTML on the right updates as you type.

Step 4 Pick Your Options

  • Full HTML page: wraps the code in a complete document with a doctype, head and body.
  • Keep inline styles: off by default for clean code. Turn it on to keep text alignment and text colors. Word’s own mso- styles are never kept.
  • Remove empty paragraphs: Word uses blank paragraphs for spacing. This drops them.
  • Keep images: turn it off to get the text without any <img> tags.
  • Indent code: one tag per line, neatly indented. Turn it off for compact HTML on one line. Our HTML Formatter has more indent options.

Step 5 Copy or Download

Click Copy and paste the HTML into your website, CMS or email template, or click Download for a full .html page named after your first heading. Switch to Preview first if you want to see how a browser shows it. Your document stays in this browser until you click Clear.

What Gets Cleaned Up

Here’s a bold line and a two-item bullet list, as Word really puts it on the clipboard, and what you get from this tool:

What Word pastes:

<p class=MsoNormal><b><span lang=EN-GB style='font-size:12.0pt;
mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>Opening hours</span></b><o:p></o:p></p>
<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></span></span><![endif]>Monday to Friday: 8am to 6pm<o:p></o:p></p>
<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;
mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></span></span><![endif]>Saturday: 9am to 1pm<o:p></o:p></p>

Clean HTML:

<p><strong>Opening hours</strong></p>
<ul>
  <li>Monday to Friday: 8am to 6pm</li>
  <li>Saturday: 9am to 1pm</li>
</ul>

Google Docs to HTML: Tips

Copying from Google Docs works the same way: select, copy, paste. Docs has its own quirks, and the cleaner knows them:

What Google Docs pastes:

<b style="font-weight:normal;" id="docs-internal-guid-4f1c...">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;">
<span style="font-size:11pt;font-family:Arial,sans-serif;color:#000000;
background-color:transparent;font-weight:700;font-style:normal;
font-variant:normal;text-decoration:none;vertical-align:baseline;
white-space:pre-wrap;">Note:</span><span style="font-size:11pt;
font-family:Arial,sans-serif;color:#000000;font-weight:400;
white-space:pre-wrap;"> the shop opens late on Sunday.</span></p></b>

Clean HTML:

<p><strong>Note:</strong> the shop opens late on Sunday.</p>

What It Can’t Do

Word can do a lot that a web page can’t, so a few things don’t come along. Better to know up front:

Frequently Asked Questions

How do I convert a Word document to HTML?

Open the document in Word, select what you need (Ctrl+A for everything), copy it and paste it into the editor on this page. Or click Open .docx and pick the file. The left panel shows your document, and the right panel shows clean HTML that you can copy or download as an .html file.

Why not just use “Save as Web Page” in Word?

Word’s own HTML is made so Word can open the file again, not for a website. It’s full of class="MsoNormal", mso- styles, conditional comments, <o:p> tags and fonts on every line. A one-page letter can turn into hundreds of lines. This tool keeps the parts that matter (headings, bold, lists, tables, links, images) and drops the rest.

Can I convert Google Docs to HTML?

Yes. Copy from your Google Doc and paste it here. Google Docs wraps everything in a <b> tag that isn’t really bold and puts long inline styles on every span; the cleaner removes those and turns font-weight: 700 into <strong>, italic into <em>, and so on. You can also download the doc as .docx (File > Download > Microsoft Word) and open that file here.

Does it keep tables and images?

Tables are kept, including merged cells. If every cell in the first row is bold, that row becomes a header row with <th> cells. Images from a .docx file are kept as data: URIs, so they live inside the HTML. When you paste from desktop Word, images usually can’t come along, because Word only gives the browser a path to a temporary file on your computer. Open the .docx instead to keep them.

Can I open an old .doc file?

Not directly. The old .doc format is a binary format that this converter can’t read. Open the file in Word, Google Docs or LibreOffice, save it as .docx, and open that here. The same goes for .odt, .rtf and .pages files.

What does “Keep inline styles” do?

It’s off by default, so you get plain semantic HTML with no style attributes at all, which is what most websites and CMSs want. Turn it on to keep text alignment (text-align: center) and text colors. Word’s own styles like mso-bidi-font-size, margins and fonts are never kept either way.

Can I edit the text before I copy the HTML?

Yes. The left panel is a normal editor with a toolbar: headings, bold, italic, lists, links, quotes, text color and table tools (add or delete rows and columns, merge cells, header row). The HTML on the right updates as you type, and the Preview tab shows how it looks in a browser.

Is my document uploaded anywhere?

No. Pasting, cleaning and opening .docx files all happen in your browser, and nothing is sent to a server. The document is kept in this browser’s local storage so it’s still there after a refresh (very big documents with lots of images may not fit). Click the Clear button to remove it.