Convert to HTML
Turn any of 14 document formats into clean standalone HTML — proper DOCTYPE, head and body structure. Pandoc's writer produces semantic markup, not div soup.
Click to start converting
Go to Pandoc engine — HTML output selected automatically
Supported input formats
| 格式 | 扩展名 | 说明 |
|---|---|---|
| Word (docx) | .docx | Headings, tables, footnotes, images, tracked changes |
| LibreOffice (odt) | .odt | Paragraph styles, master pages, embedded media |
| E-book (epub) | .epub | Chapter structure, book metadata, images |
| HTML | .html | Headings, lists, tables, links — genuine HTML reader |
| LaTeX | .tex | Math, environments, citations |
| reStructuredText | .rst | Directives, roles, tables |
| Org-mode | .org | Headlines, properties, drawers |
| CSV | .csv | Pandoc renders as GFM pipe tables |
| TSV | .tsv | Tab-separated, rendered as pipe tables |
| MediaWiki | .mediawiki | Templates, links, tables |
| DocBook | .docbook | Articles, sections, media objects |
| OPML outlines | .opml | Nested outlines → heading hierarchy |
| Jupyter notebook | .ipynb | Code cells, outputs, markdown cells |
How the conversion works
Pandoc's readers parse your document into a semantic tree, and the HTML writer serializes it with clean, standard markup: real h1–h6 headings, table elements, figure elements for captioned images, and proper emphasis instead of style soup.
The output is a standalone document — DOCTYPE, head with UTF-8 meta, and a body. There are no Word-export artifacts: no mso- conditional comments, no inline font declarations, no 20-line clean-up regex needed afterwards.
Like every conversion on this site, it runs in a WebAssembly worker inside your browser. Files stay on your device.
Common issues and how to fix them
The HTML is intentionally unstyled — semantic markup with no CSS. Paste it into your CMS or wrap it in your own stylesheet, and apply your own classes after conversion if you need inline styling.
LaTeX math can be rendered with MathJax, KaTeX or MathML — pick the method in the options panel before converting, or leave it plain if your target system renders math itself.
Fenced code blocks are syntax-highlighted by Pandoc using the theme you select. Images are referenced by relative path; use the ZIP download when converting docx so the media/ folder travels with the HTML file.
Who uses this page
Writers pasting formatted Word content into CMS editors that accept HTML, support teams turning manuals into help-center articles, and developers embedding generated documentation fragments into web apps or email newsletters.
Convert to HTML FAQ
+Do I get a standalone HTML file or just a fragment?
Standalone. Pandoc produces a full HTML document with DOCTYPE, <head> and <body> — ready to open in any browser or upload to a CMS.
+Can I convert Word documents to HTML?
Yes. Drop a .docx and select HTML output. Headings, tables, footnotes and images are preserved. The result is clean semantic HTML, not Word's export mess.
+What about LaTeX math?
Pandoc can render LaTeX math as MathJax, KaTeX, MathML or plain text. Choose the rendering method in the options panel.
+Does it support syntax highlighting?
Yes. Pandoc highlights fenced code blocks using a syntax theme you can select — pygments, kate, monochrome and more.