Free Runs in your browser · nothing uploaded

LaTeX to HTML Converter

Convert LaTeX to HTML right here: paste a snippet or a whole .tex file and copy clean HTML with MathML for any web page.

Output updates as you type
Your text stays on this device

How do you convert LaTeX to HTML?

  1. Paste your LaTeX into the left box, or press Example to load a full document.
  2. Check the preview. Anything the converter skipped is listed under it.
  3. Choose how math is written: MathML or KaTeX HTML.
  4. Press Copy HTML and paste the result into your page or CMS.

Should math be MathML or KaTeX HTML?

Pick MathML for most pages. Browsers draw it natively (Chrome and Edge since version 109, Firefox, Safari), screen readers can read it, and you add no CSS or scripts.

Pick KaTeX HTML when you need identical rendering everywhere. It needs the KaTeX stylesheet on your page, about 25 KB plus fonts.

Which LaTeX commands are supported?

LaTeXHTML you get
\section, \subsection, \subsubsection<h2> to <h4>
$…$, \(…\)inline math
\[…\], $$…$$, equation, align, gather, multlinedisplay math
itemize, enumerate, description (nested too)<ul>, <ol>, <dl>
tabular with \multicolumn<table> with colspan
\textbf, \emph, \texttt, \underline<strong>, <em>, <code>, <u>
\href, \url, \footnotelinks and numbered footnotes
verbatim, \verb, figure, \caption<pre>, <figure>, <figcaption>

Which LaTeX features are not supported?

  • Your own macros from \newcommand are not expanded.
  • \cite and \ref show the key in brackets, since HTML has no reference numbering.
  • TikZ and pgfplots drawings, and files pulled in with \input.
  • Page layout such as margins, fonts and \newpage. A web page has no pages.

Can you convert a whole .tex file?

Yes. Paste the full file: this LaTeX to HTML converter skips the preamble, keeps everything between \begin{document} and \end{document}, and turns \title into the page heading.

Images keep their file paths, so upload the image files next to the page.

How do you add the HTML to a web page?

Paste it inside your page's <main> or article area. With MathML nothing else is needed. With KaTeX HTML, add the KaTeX stylesheet to the page's <head>. In WordPress, use a Custom HTML block so the editor keeps the tags as they are.

Runs on your deviceThe converter works in your browser. Nothing you paste is sent to a server.
Honest about limitsAnything it can't convert is listed, not silently dropped.
Primary sourcesCommands from CTAN docs, codes from Unicode and the HTML standard.
Nothing to buyNo account, no paywall, no editor to upsell.

Text drafted with AI from the KaTeX and HTML documentation; checked by Cem Demir. See the editorial policy.