Useful Utilities

HTML Formatter

Reflow pasted or minified HTML onto indented lines: block tags one per line, void and inline tags respected, and <pre> blocks untouched.

Fill in the values and calculate

HTML source*Paste any HTML; the markup itself is not validated
Indent widthSpaces added per nesting levelDefault 2

The form sends itself back to this page — results print below, computed on the server.

No results yet: fill the form above and press Calculate.

About HTML Formatter

Pasted, minified, or machine-generated HTML comes back as the same markup laid out one block tag per line, indented by nesting level. Runs collapse to single spaces between tags, and text keeps its words.

Void tags such as br, img, and meta never open a level, inline tags such as b and span stay on the line they belong to, and the content of a pre block is returned exactly as it was pasted. The formatter reflows; it does not rewrite or validate the markup.

Questions about HTML Formatter

Does it change what the page renders?

Only whitespace changes. Indentation and line breaks sit between block tags, where browsers already treat them as spacing.

Are inline tags moved to their own lines?

No. Tags like strong, span, or a link keep their text on the same line, because breaking those lines would change how the text lays out.

Is the HTML validated?

No. It reflows tokens without a parser checking nesting, so a stray closing tag just re-indents the lines after it.

Bookmark and homescreen