Formatters & Validators
HTML Formatter / Validator
Tidy HTML markup indentation and flag errors.
Input0 chars
Output
Guide & explanation
The HTML Formatter / Validator re-indents markup and flags tag-structure problems.
Format and minify
Format writes one block tag per line with indentation. Minify strips comments (except conditional <!--[if ...]> comments) and collapses whitespace between tags, keeping a single space between inline elements.
The contents of pre, textarea, script, and style are not touched, because whitespace inside them is significant.
Example
<ul><li>One<li>Two</ul>
becomes
<ul>
<li>One</li>
<li>Two</li>
</ul>
Reading the results
- Balanced tag structure — the element count and depth are shown.
- Structure issues — a
line:columnlist, e.g.<div> opened but never closedor</span> has no opening tag.
The check is structural (tag pairing), not full HTML-spec validation. The Collapse text whitespace toggle controls whether text between tags is squashed.