Convert while keeping headings, bold and lists
Conversion preserves basic structure — headings, paragraphs, bold, italic and lists — but not exact fonts, colors, spacing or other fine-grained styling from the original document. Everything runs locally in your browser, and your file is never uploaded.
Word to HTML converts a .docx document into HTML code. After you choose a file, the page shows a rendered preview followed by the HTML source, which you can copy with 'Copy code' or save with 'Download .html'. It keeps basic structure such as headings, paragraphs, bold, italic, lists, links and tables, but not exact fonts, colors or spacing. The displayed and copied output is a fragment of the document body; the downloaded file adds a minimal doctype, charset declaration and title, but no stylesheet. Only .docx is supported; an older .doc file must first be re-saved as .docx in Word.
We ran generated .docx test documents through the same conversion library (mammoth). One had a Heading 2, a tiny 1×1 pixel image, a line with a hyperlink, and a Heading 3. The result: the Heading 2 became an h2 tag and the Heading 3 an h3 tag; the hyperlink became an a tag with an href; underlined text lost its underline; struck-through text became an s tag; and the image was embedded by default as an img tag whose src is a long string starting with data:image/png;base64 (with 'Include images' unticked, no img tag is produced). A second document with a bullet list, a numbered list and a two-row, two-column table became ul, ol and table tags, with each table cell's text wrapped in a p tag and no th header cells. In short, structure is largely preserved, some details are dropped, and images make the code much longer.
The conversion relies on paragraph styles in the Word document. Only paragraphs using the built-in Heading 1 to Heading 6 styles are recognised as headings. If you just made text bigger and bolder by hand, the tool cannot know it is a heading and outputs a normal paragraph. Reapply the styles from the Home tab's style gallery in Word and convert again.
That is an image (untick 'Include images' if you do not need it). Every picture in the document is encoded as base64 text and placed inside an img tag, so the HTML can show the image without a separate file. The price is longer code. If you plan to publish on a website, you will usually want to export the images separately and use normal image URLs.
Use it as a content fragment, not as a complete page. The copied code has no doctype, head or styling (the downloaded file has only a minimal wrapper, also unstyled), so you need to place it in your own page template and supply the CSS. Check the result in your site before publishing, especially tables and images.
The converted code is passed through DOMPurify before it is shown and downloaded, which is meant to remove scripts and other risky content. Sanitizing is one layer of protection, though. If the document comes from an untrusted source, review the code yourself before putting it on a site.
Both first convert the document to HTML. This tool outputs the HTML directly, keeping things such as tables and strikethrough. Word to Markdown then converts that HTML into Markdown syntax, where tables end up as plain paragraphs. Use this one for web publishing, and the other for Markdown-based documents or note apps.
The file is read in your browser and converted locally by a library that the page loads on demand, and the sanitizing also happens locally. The code contains no network request that sends the document to a server. The result exists only on the current page and is gone when you close or refresh it.