Show HN: DOM-docx – HTML to native, editable Word docs (MIT)
DOM-docx is a new open-source library that converts semantic HTML fragments into native, editable Microsoft Word documents. It emphasizes structural fidelity and avoids layout hacks by using a visual regression testing loop.
Why it matters
This tool provides a robust solution for developers needing to generate complex, programmatically created documents without relying on heavy browser-based dependencies.
Convert semantic HTML fragments to native, editable Word documents (OOXML): paragraphs, runs, lists, tables, images. Not screenshots or layout hacks.
Live demo: dom-docx.com . Try the converter, browse showcases, read the learn guide.
Built with a visual regression loop: render HTML in Chromium, convert to docx, rasterize via LibreOffice, score layout + structural fidelity against a human-validated metric, iterate. Latest scores: TEST-SCORES.md · methodology: SCORING.md .
npm install dom-docx Requires Node.js ≥ 20 . No browser or Playwright is needed for the default inline path.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in