jsonecho

HTML Pretty Print

Pretty print HTML with 2 spaces, 4 spaces or tabs.

Loading the tool...

How to use HTML Pretty Print

  1. Paste your HTML.
  2. Pick an indent and copy the result.

About HTML Pretty Print

Pretty printing turns a dense block of HTML into something you can scan. Each element gets its own line, nesting is shown by indentation, and the content you would not want touched stays as it is.

It is the same engine as the HTML Formatter. People search for both names, so both exist.

Frequently asked questions

Is pretty print different from beautify?

No, all three names, pretty print, beautify and format, describe the same thing.

Can I pretty print only a fragment?

Yes, you do not need a full page with html and body tags.

Will it add missing closing tags?

No. Run the validator to find them.

More in HTML Tools

All tools →