CruxDevCruxDev Tools Studio Prompts
file Utility • Zero-Server Privacy • 100% Client-Side

HTML to Word (DOCX) Converter

Turn HTML into a Word .docx with headings, lists, tables, links and code kept as real Word styles. Scripts, styles and event handlers are removed first, and nothing leaves your browser.

Overview

Turns HTML into an editable Word .docx with real heading styles, numbered and bulleted lists, bordered tables, hyperlinks and code blocks. Script, style, iframe and form elements are removed and only a few safe attributes are kept, so event handlers cannot reach the file. Conversion happens in your browser without uploading the page.

How It Works

Paste HTML into the editor or drop an .html or .htm file of up to 10 MB, and the preview shows the cleaned content that will be written to the document. The tool understands h1 to h6, p, strong, em, u, s, code, a, ul, ol, li, table, pre, blockquote, hr, br and img. Choose the page size, body font, font size and author, then download. The document title comes from the first heading or the HTML title element, and you can override it.

Step-by-Step Usage Guide

  1. Paste HTML or drop an .html file onto the page.
  2. Check the preview to confirm scripts and layout wrappers were removed.
  3. Choose the page size, font, body size and author name.
  4. Adjust the document title if the first heading is not right.
  5. Click Download and open the .docx in your word processor.

Technical Specifications & Standards

The HTML is parsed with the browser DOMParser into an inert document, so nothing in it runs while it is read. The converter then walks the tree with an allow list. Block elements become paragraphs, headings, list items, tables, code blocks or quotes; container elements such as div, section and article are flattened into their children; and script, style, iframe, object, embed, svg, canvas and form controls are dropped with their content. Attributes are never copied, which removes onclick handlers and inline styles, except for href, src, start, alt and the text-align of table cells. Links keep only http, https, mailto and tel targets, so javascript: links become plain text. Whitespace is collapsed the way a browser renders it, while text inside pre keeps its line breaks. Nested ul and ol elements become nested Word list levels, and an ol with a start attribute keeps its starting number. Images are embedded only when their src is a base64 PNG, JPEG or GIF data URL; any other image becomes its alt text in brackets.

Targeted Use Cases

  • Saving an HTML email template or newsletter as an editable Word draft.
  • Converting a CMS article export into a .docx for an editor who works in Word.
  • Turning generated HTML reports into Word documents that can carry tracked changes.
  • Moving help-center pages into Word for legal or compliance review.

Notes & Gotchas

  • Paste the article body rather than a whole page, so navigation menus and footers do not end up in the document.
  • Use semantic tags such as h2 and ul in the source; styled divs lose their look because inline CSS is dropped.
  • Inline important images as data URLs before converting, since linked images are never fetched.

Frequently Asked Questions

Does the HTML keep its CSS styling in Word?

No. Inline styles, classes and style sheets are removed, and the content is restyled with clean Word styles for body text, headings, code and quotes. Table cell text alignment is the one style that is kept.

Is it safe to convert HTML from an unknown source?

The markup is parsed into an inert document where scripts do not run, and only allow-listed tags and a few safe attributes are converted. Script and iframe content and javascript: links never reach the preview or the .docx.

Can it convert a live web page from a URL?

No, it does not fetch pages. Open the page in your browser, save it or copy its HTML source, then paste or drop that HTML here.

What happens to nested lists and tables?

Nested ul and ol elements become indented Word list levels with bullets or numbers. Tables become bordered Word tables, and a header row made of th cells repeats on each page.

Related tools

  • Markdown to Word (DOCX) Converter - Convert Markdown or a GitHub README into an editable Word .docx with real headings, numbered and nested lists, bordered tables, code blocks, links and embedded images, built in your browser.
  • HTML to PDF - Paste HTML or load an .html file, preview it on a real page size, and export a PDF with your choice of paper, orientation and margins. Scripts and event handlers are removed first.
  • DOCX to HTML Converter - Convert Word .docx documents to clean HTML using Mammoth.js — no server required.
  • HTML to Markdown Converter - Convert HTML into clean GitHub-flavored Markdown - headings, links, images, lists, code blocks, and tables - with Markdown-significant characters safely escaped.
  • PDF to Word (DOCX) - Convert a PDF into an editable Word .docx file in your browser, with headings detected by font size, one section per page, and an exact-layout option that places each page as an image.
  • Word to HTML / Markdown - Convert a Word .docx file to clean HTML and GitHub Markdown with headings, lists, tables and links kept, and images embedded as base64 or exported as separate files in a ZIP.