HTML Formatter and Minifier
Parse HTML5 locally and format attributes or compact tag syntax while preserving inline text, pre, textarea and raw-text whitespace.
html-formatterLOCAL WORKSPACE
Enabling local controls…
If clipboard access is denied, select the read-only output manually. Input HTML, SVG, CSS and JavaScript are never rendered or executed.
How to use this tool
Paste a document or fragment and choose a mode. Formatting adds line breaks inside tags only; compacting keeps text whitespace. HTML5 parsing may normalize tag syntax.
When not to use it
Output remains source text and is never rendered. This is conservative serialization, not sanitization or aggressive whitespace removal. DTD/entity declarations are rejected.
Read the guide →