LaTeX Formatter

Beautify LaTeX indentation and run a syntax check.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste LaTeX and get indented source followed by a comment block with the syntax-check result, so you format and check in one step.

How to use

1
Step 1
Paste your LaTeX.
2
Step 2
Press Format.
3
Step 3
Read the % --- check --- comments at the bottom, then copy the source.

How it works

The formatter runs the beautifier and then the syntax checker, appending the report as % comment lines so the result can be pasted straight into a file. Remove the comment block when you are happy. The same caveat applies as in the checker: text environments unknown to KaTeX can be reported even if LaTeX accepts them.

result = beautify(source) + "% --- check ---" + report as % comments

Worked example

A clean align block

Input
\begin{align} x&=1\\ y&=2 \end{align}
Output
\begin{align} x&=1\\ y&=2 \end{align} % --- check --- % OK, no issues found.
Walkthrough
The align block is indented, then the checker found nothing to report.

Limitations

  • Whitespace and report only; no structural fixes.
  • Text-mode environments such as itemize can trigger a KaTeX note in the report.

Questions

What is the difference from the Beautifier?
The Formatter also appends the syntax check as comments.
Can I paste the result into my file?
Yes, the report is in % comments and is ignored by LaTeX.
Does it fix errors it reports?
No, it only reports them.

Features

  • Indent plus check
  • Comment report
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • PDF, What is it FOR?

    Computerphile

    Papers and appendices often ship as fixed PDF packets.

    Watch on YouTube
  • HTML Crash Course For Absolute Beginners

    Traversy Media

    Web writing basics for paper and citation helpers.

    Watch on YouTube