Convert HTML to a Word DOCX file using docx.js. Converts headings (h1–h6), paragraphs, bold, italic, hyperlinks, and lists to proper Word styles. Paste HTML or upload a .html file. Download as .docx.
Paste raw HTML or upload a .html file. The converter parses headings (h1–h6), paragraphs, bold, italic, underline, hyperlinks, ordered and unordered lists. Complex layout elements (tables, floats, columns) are simplified to paragraphs.
A plain text preview shows the content that will appear in the Word document. Elements that cannot be converted to Word structure are shown with a note.
Click Download DOCX. docx.js generates a valid .docx file in your browser using the Open XML format. Open in Microsoft Word, LibreOffice Writer, or Google Docs (via File > Open).
Fully supported: h1–h6 (mapped to Word heading styles), p (Normal style), strong/b (Bold character run), em/i (Italic character run), u (Underline), a href (Hyperlink with URL), ul/ol/li (Bullet and Numbered lists), br (line break). Partially supported: blockquote (indented paragraph), code (Courier New font). Not supported: tables (converted to plain text), images (omitted), CSS colours and fonts (Word styles applied instead), div/span (treated as paragraph containers).
DOCX table creation with docx.js requires defining each row and cell explicitly, including widths and styles. Parsing arbitrary HTML tables into this structure is complex and error-prone — tables with merged cells, nested tables, or CSS-styled layouts do not map cleanly. For tables, the recommended approach is to export as CSV from your data source and import directly into Word.
docx.js (github.com/dolanmiu/docx) is an open-source JavaScript library for creating and modifying DOCX files in the browser and Node.js. It provides an API for building Word documents programmatically — defining paragraphs, headings, tables, images, and styles. This tool uses docx.js to translate parsed HTML into the equivalent DOCX document structure.
Yes — the output is a standard .docx file fully editable in Microsoft Word, LibreOffice Writer, WPS Office, and Google Docs. You can modify formatting, add images, adjust styles, and perform any other Word operations on the converted document.
No — HTML CSS styles (colours, custom fonts, sizes) are not transferred to Word. Instead, semantic HTML elements are mapped to Word's built-in styles: h1 becomes Heading 1 (Word's default H1 style), h2 becomes Heading 2, etc. This produces a cleanly formatted Word document but does not reproduce the visual appearance of the original HTML page. After conversion, apply Word styles or themes to restyle as needed.
Go to drive.google.com > New > File Upload and upload the .docx file. Or drag the .docx onto Google Drive. Google Docs automatically imports DOCX format when you open it. Alternatively: go to docs.google.com > Blank doc > File > Open > Upload the .docx. Google Docs preserves most Word styles and formatting from the converted document.