HTML formatter
Processed in your browser · nothing is uploaded
Re-indents HTML by nesting depth, leaving the contents of pre, textarea, script and style exactly as it found them.
How to use the html formatter
Those four are protected for a reason: whitespace inside them is significant. Re-indenting a `pre` block changes what the page displays, and re-indenting a `script` can break a template literal or a line comment. Void elements — `br`, `img`, `input`, `hr` and the rest — are handled too, since they have no closing tag and must not increase the indent depth. This is a formatter rather than a linter: it will not tell you a tag is unclosed, it will simply indent everything after it more deeply, which is usually obvious enough to find the problem anyway.
Questions
No. Those, with textarea and style, are preserved byte for byte because whitespace in them is significant.