HTML Beautifier

Make the nesting structure of compact HTML clear enough to review.

Make the nesting structure of compact HTML clear enough to review.

How to use

  1. Paste the sample with both paragraphs inside the main element.
  2. Format the markup and look at the new indentation rather than relying on the one-line input.
  3. Check that both paragraphs are children of main and align at the same depth.

Worked example

Input

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

Expected result

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

Check the result

The Tea and Coffee text and the closing tags should remain intact.

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

Learn how we use cookies