How do I convert a Word document to HTML?
Drop a .docx file on this page and it becomes clean HTML at once, with a live preview. The same document is also available as plain text and as Markdown, each with copy and download. Besides Word's DOCX, the page reads OpenDocument text from LibreOffice and Google Docs exports (.odt and the flat .fodt) and Rich Text Format (.rtf) from WordPad, TextEdit and many older programs.
The converter keeps what matters for the web: headings, paragraphs, bold, italic, underline, strikethrough, superscript and subscript, links, bulleted and numbered lists (nested ones too), tables, footnotes and pictures. Pictures are embedded in the HTML as data URIs, so the result is one self-contained file; a switch removes them when you only want the text. Word's visual styling (fonts, colours, spacing) is left out on purpose, so the HTML is ready to paste into a CMS, an email template or your own stylesheet.
DOCX is read with mammoth, an open source library made for exactly this job. ODT and RTF are read by parsers written for this page: ODT styles are followed through their inheritance chain to find bold, italic and headings, and RTF handles Unicode, the old Windows and Asian code pages, hyperlink fields and PNG or JPEG pictures. The HTML is then cleaned with DOMPurify, so scripts, forms and event handlers from a hostile file never reach the page. Everything runs in your browser: the document is not uploaded anywhere.
How to convert DOCX, ODT or RTF
- Open the page: an example Word document is converted right away so you can see the preview.
- Drop your document on the drop area, choose it, or paste it with Ctrl+V (⌘V on a Mac).
- Pick the output at the top: preview, HTML, text or Markdown.
- Turn embedded images off if you want a light HTML without pictures.
- Choose Copy or Download. The HTML download is a complete page with the right character set; text and Markdown are UTF-8 files.
Examples
A blog post written in Word
A writer sends post.docx with two headings, a numbered list and three photos. Drop it, switch to HTML, and copy the code into your CMS. Headings become <h1> and <h2>, the list becomes <ol>, and the photos travel inside the HTML.
Plain text from a contract
You need the text of contract.odt for a diff or a translation tool. Choose text: paragraphs are separated by a blank line, list items start with - or 1., and table cells are separated by tabs, so it pastes cleanly into a spreadsheet too.
Markdown for documentation
An RTF manual from an old help system goes into a Git repository. Choose Markdown and download it: headings use #, links keep their address and tables become GitHub tables. Then check the result with the Markdown table of contents or count words with the word counter.
Errors and limits
- "This is an old Word 97-2003 .doc file." The binary .doc format is not supported. Open the file in Word or LibreOffice and save it as .docx.
- "This document is protected by a password." Office stores encrypted documents in another container. Remove the password and save again.
- "The document is damaged or incomplete." The file was cut during a download or is not really a document. Save it again from the program that made it.
- "N pictures or objects could not be carried over." Browsers cannot show WMF and EMF drawings (old clip art, some equations), and charts or formulas are objects, not pictures.
- Page layout is not kept: headers, footers, page numbers, columns, text colours and fonts are left out. To turn the HTML into a PDF, use HTML to PDF.
- The page reads files up to 60 MB, and refuses packages that would unpack to more than 300 MB.
Frequently asked questions
Is this converter free and is my document uploaded?
It is free, without an account, and the document never leaves your browser. The conversion runs on your own device.
Does it keep tables and images?
Yes. Tables keep their rows, columns, header rows and merged cells; images are embedded as data URIs. In Markdown, tables become GitHub-style tables and images stay as data URIs.
Can I convert HTML back to Markdown or Word?
For HTML to Markdown, use HTML to Markdown. Creating a .docx file is not done here.
Why does the HTML have no fonts or colours?
On purpose: clean, semantic HTML takes your site's styles. Word's inline formatting would fight your CSS and make the code hard to edit.
Does it work with Google Docs?
Yes. In Google Docs use File, Download, and choose Microsoft Word (.docx) or OpenDocument (.odt), then drop the file here.