Converting .tex to PDF online: what works in a browser and what doesn't
If your .tex file is mostly math, equations, sections, and inline formatting, you can render it to PDF directly in your browser. If it is a full LaTeX document with packages, custom classes, figures, bibliographies, or complex tables, you need a real TeX engine like Overleaf or a local TeX Live install. Here is how to tell which case you are in, and the fastest path for each.
Why a browser can render math .tex but not full LaTeX
A browser has no TeX engine. Tools that render .tex in the browser use a math typesetting library (KaTeX or MathJax) that understands LaTeX math syntax: $...$, \[...\], align, equation, Greek letters, integrals, matrices, and the like. This subset renders beautifully and fast, with no installation.
What these libraries do not do is run LaTeX itself. Commands like \usepackage, \documentclass, \begin{figure}, \begin{tabular}, \cite, and custom macros are part of the full LaTeX language, which requires a complete TeX distribution to compile. A browser-based renderer will either ignore these commands or leak their raw markup into the output, which is why a full document looks broken when forced through a math renderer.
If your .tex is math-focused
For notes, problem sets, or a few pages of equations with basic structure (headings, bold, italic, lists), the fastest path is to convert the math through Markdown. Write or paste your content as Markdown with LaTeX math delimiters and use Markdown to PDF, which renders KaTeX math, code, and tables in your browser with nothing to install and no upload. This works well when the document is driven by its math rather than by LaTeX-specific layout. If the .tex is really a code listing or a data table dressed up in LaTeX, Code to PDF or CSV to PDF is more direct than routing it through a math renderer.
If your .tex is a full LaTeX document
For anything with packages, a custom class, figures, tables, cross-references, or a bibliography, use a real TeX engine:
- Overleaf is the most common online option. It compiles full LaTeX in the browser using a server-side TeX engine, so packages and custom classes work. Free tier is enough for most single documents.
- A local install (TeX Live, MiKTeX, or MacTeX) with
pdflatex file.texorxelatex file.texgives you full control and works offline. Usexelatexif your document uses Unicode or system fonts.
Which should you choose
If the document is essentially math with light structure, the browser path is faster and keeps your file on your device. If the document relies on LaTeX packages or precise layout, only a real TeX engine will produce correct output; a browser math renderer will not, and no online "math .tex" tool should claim otherwise.