How to use the word to HTML converter
- 1Under Source, keep Paste formatted text, click the dashed box and press Ctrl + V (⌘V on a Mac). Or choose Open a .docx file and pick the document.
- 2Choose what to keep: Keep tables, Keep images (embedded as data URIs) and Replace with spaces.
- 3Check the result under Clean HTML; switch Show to Preview to see it rendered. The footer shows how much markup was removed.
- 4Press Copy and paste into your CMS's HTML or code view, or Download
document.html.
Example
<h1 style="mso-margin-top-alt:auto"><span style="font-family:Calibri">Quarterly report</span></h1> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Sales rose <b>12%</b> in <i>Q3</i>.<o:p></o:p></span></p> <p class="MsoListParagraphCxSpFirst" style="mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">·<span> </span></span><![endif]>New stores</p> <p class="MsoListParagraphCxSpLast" style="mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">·<span> </span></span><![endif]>Online growth</p>
<h1>Quarterly report</h1> <p>Sales rose <strong>12%</strong> in <em>Q3</em>.</p> <ul> <li>New stores</li> <li>Online growth</li> </ul>
Shortened clipboard HTML from Word. Word writes bullet lists as styled paragraphs with a fake bullet character; the converter rebuilds them as a real <ul>.
Pasting from Word or Google Docs
When you copy from Word, Google Docs, Pages or a web page, the clipboard holds HTML as well as plain text. The paste box reads that HTML directly, so the structure survives: headings stay headings and lists stay lists. If the clipboard has no HTML (text copied from Notepad, for example), the text is converted into paragraphs instead.
The box accepts pastes only; typing into it is ignored, because the point is to convert existing formatted content. To write HTML by hand, use the HTML viewer.
What gets cleaned
Word's clipboard HTML is often ten times the size of the content. The converter removes:
styleattributes (fonts, sizes, colors, margins,mso-properties) andclassnames such asMsoNormal<span>and<font>wrappers, Office XML (<o:p>,<w:…>), conditional comments and<style>blocks- empty paragraphs, non-breaking spaces used for spacing (optional) and
javascript:orfile:links
Formatting that carries meaning is converted to semantic tags: bold to <strong>, italic to <em>. Google Docs marks bold and italic with font-weight and font-style styles on spans rather than tags, and those are converted too.
Headings, lists, tables and links
Kept: <h1>–<h6>, paragraphs, bulleted and numbered lists (including Word's fake lists, rebuilt as <ul> or <ol> from their bullet or number), <blockquote>, <pre>, links with their href, <sub>, <sup> and line breaks. Tables keep their rows, header cells and colspan/rowspan, but lose borders and widths; untick Keep tables to turn each row into a paragraph instead.
When you open a .docx, the Mammoth library converts it using Word's paragraph styles, so use real Heading 1/Heading 2 styles in Word rather than large bold text if you want <h1>/<h2> in the output. Images in a .docx are embedded as Base64 data URIs.
Using the HTML in a CMS
Paste the result into the HTML, Code or Text view of your editor (WordPress: Code editor or a Custom HTML block; Shopify and most others have a <> button). Pasting into the visual view would treat the tags as text. Because all inline styles are gone, the content picks up your site's own fonts and spacing, which is usually what you want.
Data-URI images make the HTML very large and are poor for page speed; upload the images to your media library and replace the src values. Run the result through the HTML formatter if you want it indented for editing.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
