HTML Beautifier

HTML Beautifier

Indent HTML to make nested elements easier to inspect.

Try this example

Paste the sample and format it. The two paragraphs should appear indented beneath the main element.

<main><p>Tea</p><p>Coffee</p></main>

Expected result

<main>
  <p>Tea</p>
  <p>Coffee</p>
</main>

Check whitespace-sensitive content in a browser before replacing the original markup.

Related walkthrough · Prepare a safe test copy before using an online tool

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies