HTML fragments → native Word documents
dom-docx maps semantic HTML to real OOXML — paragraphs, lists, tables, and links you can edit in Word. Try the live converter in your browser; no upload, no API key.
Runs in-browser
Runs in Node
Native OOXML
Inline styles (default)
Open source
Browser · inline styles
import { convertHtmlToDocx } from "dom-docx/browser";
const html = `
<h1 style="color:#1a1a2e">Quarterly Report</h1>
<p>Revenue grew <strong>12%</strong> year over year.</p>
<ul>
<li>North America</li>
<li>EMEA</li>
</ul>
`;
const blob = await convertHtmlToDocx(html, {
styleSource: "inline",
});
Built for agents and apps
Word-friendly HTML in, editable .docx out — not screenshots or layout hacks.
- Live demo Paste HTML and download a .docx — conversion runs client-side via the dom-docx browser bundle.
- Showcase gallery Financial statements, essays, dashboards, React apps, and stylesheet layouts — each with a DOCX preview.
- Node or browser npm package for servers; IIFE bundle for in-app “Export to Word” — computed styles use the live DOM, not Playwright.
Join the waitlist
Hosted API, batch conversion, and team features are on the roadmap. Leave your email for early access.