Open a Word document (.docx) and get clean, semantic HTML: real headings, lists, tables, links, footnotes and images, without the inline styles and mso- clutter that Word's own "Save as Web Page" writes. Copy it, download it, or save the images as separate files. The file never leaves your browser.
or drop a .docx on this box
Open a .docx file to start.
HTML
Preview
| In your Word file | In the HTML |
|---|---|
| Headings and the Title style | <h1> to <h6>Only paragraphs that use Word's Heading styles count as headings, not text that is merely large and bold. |
| Bold, italic, strikethrough, links | <strong>, <em>, <s>, <a> |
| Bulleted and numbered lists | Kept, with nesting |
| Tables | Plain <table>, no widths or colors |
| Footnotes and endnotes | Numbered links to a list of notes at the end |
| Images | Embedded as data URIs, saved as files in a ZIP, or removed Old EMF/WMF vector images can't be shown by browsers and are left out. |
| Fonts, colors, sizes, alignment, headers and footers | Dropped On purpose: the output is content you style yourself. |
Word can save a document as HTML, but that file is meant to be opened again in Word: every paragraph carries class="MsoNormal" and inline mso- styles, lists are often paragraphs with a bullet character and tab spans instead of <ul>, and the page starts with kilobytes of conditional comments and XML. Pasting that into a CMS or an email brings Word's formatting with it. This converter reads the document's structure instead (what is a heading, a list item, a table cell), using mammoth, and writes only plain tags, one block per line.
Embedded puts each image inside the HTML as a data: URI, so you get one self-contained file, but large photos make it long. Files (ZIP) downloads a ZIP with the .html file and an images/ folder (image1.png, image2.jpeg…) that the HTML links to with relative paths, which is what Git repositories, static site generators and most CMS uploads expect. Alt text set in Word is kept.
The same library has a command line, so you can convert a folder of documents with no browser: npx mammoth report.docx report.html writes clean HTML with embedded images, and mkdir out && npx mammoth report.docx --output-dir=out writes out/report.html with the images as separate files (the folder must exist). One difference from this page: the command line turns Word's Title style into a plain paragraph unless you pass a style map. To turn .docx files into PDFs on a server without LibreOffice, send that HTML to the Shotmint PDF API: the Word to PDF page has a tested Node script. Each PDF is 1 credit; new keys get 25 free.
Get 25 free renders a month API docs
Is my document uploaded? No. The .docx is read and converted by JavaScript in your browser, and the preview is a sandboxed frame that can't run scripts or load anything.
Does it work with .doc files? No, only .docx (Word 2007 and later, also what Google Docs and LibreOffice export). Open an old .doc in Word or LibreOffice and save it as .docx first.
My headings came out as plain paragraphs. They were formatted by hand (bigger, bold) rather than with Word's Heading 1, Heading 2… styles. Apply the styles in Word and convert again; it also fixes the document's navigation pane.
Can I get a PDF instead? Yes: Word to PDF prints the same content to a PDF with selectable text.
Related: DOCX to HTML, Word to Markdown, DOCX to Markdown, HTML to Word, Word to PDF, HTML to Markdown, Google Docs to Markdown, PDF to Markdown, HTML viewer, Markdown to PDF.
HTML to Word · Markdown to Word · Word to PDF · PDF to Word · Word to Markdown Converter · HTML to Markdown · HTML formatter · Markdown to HTML · Online HTML editor · HTML viewer · HTML to PDF · HTML to image · PDF to HTML · DOCX to HTML · HTML Beautifier · HTML Decode · HTML Encode · HTML Minifier · all free tools