Skip to content
EQpour
Menu

HTML to DOCX: turn pasted HTML into a Word file with real equations

Paste HTML, or upload an .html file, and download a .docx. Headings, lists, tables, links and embedded images are kept, and KaTeX, MathJax and MathML formulas become native Word equations.

10/10 formulas1 table424/20,000 characters

Your text stays in this browser. Nothing is uploaded.

MathType export is a Pro feature

Pro turns every formula into a MathType object you can edit in MathType. Download Word with Word equations stays free.

Daily downloads used up

Good to know. This is a web tool, not a library or an API. It converts content, and when "Keep original formatting" is on and you have not edited the text, it also carries over embedded images, text and background colours, alignment, links, merged cells and nested tables. Images that point to a web address become the text [image: alt]. After you edit the text, the file is built from Markdown and keeps less. Scripts and page layout are not converted.

Before and after

HTML you paste

<h2>Results</h2>
<table>
  <tr><th>Case</th><th>Formula</th></tr>
  <tr><td>Energy</td><td>$E = mc^2$</td></tr>
</table>

In the .docx: a table and an equation

E=mc2E = mc^{2}

The right side is drawn here to show the idea. In the Word file, the formula is a native Word equation you can click and edit.

How it works

  1. Step 1

    Paste or upload

    Paste HTML or rendered content, or press Upload file and choose an .html file. The HTML limit is 2,000,000 characters, not counting embedded data images. Each image can be up to 5 MB, and all images together up to 20 MB.

  2. Step 2

    Read the preview

    Pasted content is shown as Markdown. Fix anything that looks wrong before you download.

  3. Step 3

    Download the .docx

    Press Download Word. Open the file and click any formula to edit it.

What's preserved: editable equations and tables, not images

  • Tables

    HTML tables become Word tables, with real merged cells and nested tables on the full HTML path.

  • Formulas

    KaTeX, MathJax and MathML become native Word equations (OMML).

  • Headings, lists and text

    Heading 1 to 6, lists and links become real Word styles and links.

  • Not converted

    Scripts and page layout. Images from web addresses become the text [image: alt]. After you edit the text, colours, images and merged cells are dropped.

Two paths, and when each is used

With “Keep original formatting” on and the text not edited, the full HTML path is used. After you edit the text in the editor, the file is built from Markdown instead: merged cells are left empty and images are dropped.

HTML to DOCX, and what “DOCX” means here

People searching for HTML to DOCX are often either writers who want a document, or developers who want to see what the output looks like. This page serves the first group and is honest about the second. The file you get is a normal .docx that Word, LibreOffice and Google Docs can open. Inside, a formula is an equation object and a table is a table, not a picture of one.

If your HTML comes from a page you are only reading, the shorter route is the HTML to Word page. If it comes from a rich-text editor, see Rich text to Word.

Frequently asked questions

What ends up inside the .docx?

Headings, paragraphs, lists, tables and formulas. A .docx is a zip of XML files, and formulas are stored as OMML, the same format Word uses when you type an equation yourself.

Can I call this from code or run it on a server?

No. It is a page you use in the browser. If you need conversion inside an application, this tool is not a library or an API.

Does it keep CSS, images and colours?

Partly. With "Keep original formatting" on and the text not edited, text and background colours, alignment and links are kept. After you edit the text, formatting is dropped because the file is built from Markdown. Page layout and scripts are never converted. For a faithful copy of how a page looks, print it to PDF.

What happens to merged cells and a table inside a table?

With "Keep original formatting" on and the text not edited, merged cells (rowspan and colspan) become real merged cells and a table inside a table stays a table. If you edit the text first, the Markdown path is used: merged cells are left empty and a nested table becomes text in the cell.

Which formula markup is read?

Formulas drawn by KaTeX or MathJax, MathML, and LaTeX written inside dollar signs. Check the preview for anything unusual before you download.

Is my HTML uploaded to a server?

The conversion runs in your browser tab. See the security page for the details.