How to compile LaTeX code to PDF

LaTeX source becomes a PDF through compilation — a TeX engine reads your commands and typesets pages. This page shows the shortest path: real pdfLaTeX running in your browser.

Compile, don’t convert

You will see the phrase “LaTeX converter” around the web. It misleads: there is no format conversion happening. An engine — pdfLaTeX is the default — interprets your source and typesets it: it breaks lines, places floats, renders math, numbers sections and resolves \ref/\cite references across passes. The output is exactly what a local TeX installation would produce.

Compile in the browser

  1. Open the LaTeX → PDF page.
  2. Paste your code or keep the example.
  3. Press Compile. The engine and any packages your document needs download once, then stay cached.
  4. Download the PDF when it is ready.

Compile LaTeX → PDF now →

What a complete document needs

Real documents rarely fit in one pass. A paper with a bibliography needs:

  1. a pdfLaTeX pass — writes .aux with citation keys;
  2. a BibTeX pass — turns the keys and your .bib file into a formatted bibliography;
  3. one or two more pdfLaTeX passes — settles citation numbers and cross-references.

texviewer runs that sequence for you when the document uses \bibliography — the article template demonstrates it.

When compilation fails

Failures are normal and always carry a line number. The frequent ones each get a short guide:

Compile the example in the editor →