Word to HTML
Choose a Word document to get clean HTML for a web page or a site’s editor, with a preview to check it. It’s converted on your device.
or drop it here. A .docx file (Word 2007 or later), up to 25 MB.
Off: images are left out. On: each image goes into the HTML as a data: address, which makes the file much larger.
Choose a Word document to turn it into HTML.
Preview
Plain formatting only, so merged table cells show unmerged here. What your site shows depends on its own styles.
Your document stays on your device: it’s converted by this page, and nothing is uploaded or saved.
Clean HTML from a Word document
Pasting from Word into a website’s editor often drags along fonts, colors and hidden styling that fight the site’s own look. This tool writes HTML from what the document means instead: a Heading 1 becomes an h1, a bulleted list a list, bold stays bold. The result is short, tidy code that takes your site’s styles. The converter is mammoth, an open-source library, running in your browser.
How to use it
- Choose a .docx file or drop it on the box, up to 25 MB.
- Decide on images: left out, as they are at first, or embedded in the HTML.
- Read the notes, if any, and check the preview.
- Copy the HTML to paste into an editor, or download it as a complete .html page with a title.
What it keeps and what it doesn’t
- Kept: headings in Word’s Heading 1 to 6 styles, paragraphs, bulleted and numbered lists, bold, italic, strikethrough, superscript, subscript, line breaks, links and tables, merged cells included. Footnotes and endnotes are listed at the end, linked both ways.
- Left out: fonts, sizes, colors, underlining, alignment, page layout, headers and footers, comments, equations, and table borders and shading.
- Other styles, such as Title or Quote, become ordinary paragraphs, and the notes say which.
- Text boxes come right after the paragraph they’re anchored to.
Images
Left out, the HTML stays small and you add pictures in your site’s editor. Embedded, each picture is written into the code itself as a data: address, so the code grows by the size of every picture. The preview shows PNG, JPEG, GIF and WebP pictures; Word’s older EMF and WMF drawings don’t show in browsers at all.
Good to know
- The preview is safe. It shows plain formatting only, so a script or a trick link hidden in a document can’t run here. Links that would run code are turned into text in the HTML too.
- .doc files from Word 97–2003 need saving as .docx in Word first.
- Your document never leaves your device. Nothing is uploaded or saved.
- Smaller still? The HTML Minifier takes out the line breaks between tags. It tidies HTML you already have; this page makes HTML from a Word file.