LaTeX Beautifier

Indent LaTeX environments and normalize whitespace.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste LaTeX and get consistent two-space indentation inside every \begin … \end block, with lines trimmed.

How to use

1
Step 1
Paste your LaTeX.
2
Step 2
Press Beautify.
3
Step 3
Copy the indented source.

How it works

Indentation by environment depth makes nested lists, tabulars and align blocks easy to read and review. The beautifier changes only whitespace; the compiled output is unchanged.

indent = 2 spaces × environment depth

Worked example

An align block

Input
\begin{align} x&=1\\ y&=2 \end{align}
Output
\begin{align} x&=1\\ y&=2 \end{align}
Walkthrough
Both equation lines are inside one environment, so each is indented one level.

Limitations

  • Whitespace only; it does not wrap long lines or align & characters.

Questions

Does it change my output PDF?
No, indentation is ignored by LaTeX.
Will it align the & signs?
No, only indentation by depth.
Is it the same as LaTeX Formatter?
Beautifier only indents; Formatter indents and appends a syntax-check report as comments.

Features

  • Depth-based indent
  • Whitespace only
  • Runs in your browser

Related resources

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

  • HTML Crash Course For Absolute Beginners

    Traversy Media

    Web writing basics for paper and citation helpers.

    Watch on YouTube
  • PDF, What is it FOR?

    Computerphile

    Papers and appendices often ship as fixed PDF packets.

    Watch on YouTube