HTML Formatter
Indent minified or tangled HTML, including the CSS and JavaScript inside it.
- Privacy
- This tool runs in your browser. Nothing you enter is sent to Wayfind.
- Filed under
- Filed under
Indent minified or tangled HTML, including the CSS and JavaScript inside it.
Tags, attributes, comments and words stay as written; only whitespace changes. A run of spaces or line breaks in text becomes one space, which is how a browser shows it anyway, and elements go on lines of their own, which can add a small gap between inline-block elements. The content of pre, textarea and SVG text elements is left untouched. Text that CSS sets to keep its spaces (white-space: pre) cannot be recognised from the markup, so check such pages after formatting.
The content of style and script elements is formatted too, by the same engines the CSS Formatter and the JavaScript Formatter use, and indented to the depth of the element holding it. A script the JavaScript engine cannot format without changing it is kept as written.
Yes. It is not a validator: an unclosed tag or a fragment without html and body is indented as it is, so you can tidy a template or a snippet as easily as a whole page.
No. It is formatted in this browser tab, in a background worker, and never leaves your device.