ARZENTIQ
DEVELOPER & DATA

HTML Formatter & Minifier

Pretty-print HTML with block elements on their own lines and inline elements kept in flow — pre, script and style untouched — or minify it.

Indented, readable HTML that renders identically to the input, or a compact one-line version with the saving shown, plus a note when tags are unbalanced.

Example: A one-line document with head, style, a div holding an h1, a paragraph with a link, a list and a pre block comes back as 22 indented lines; minified, it drops every space between tags.

v0.1.0 · last reviewed 19 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Blocks on lines,
inline in flow.

The one rule that keeps formatted HTML rendering the same, what is left verbatim, and what minify removes.

Formatting

Whitespace between block-level elements (div, p, ul, li, table, headings…) does not change how a page renders, so each block element goes on its own line and its children are indented. Whitespace inside text, and between inline elements (a, span, strong, em, code, img, br…), does render — as a space — so inline elements stay in the text flow and runs of whitespace collapse to one space, exactly as a browser would display them. A block that holds only a short run of inline content (<p>text</p>) is kept on one line. Tag names and attributes are left as written apart from collapsing whitespace between attributes.

Left verbatim

The contents of pre, textarea, script and style are copied through untouched, because there whitespace is significant or is code. Comments are kept (or dropped, by option); conditional comments are always kept. The DOCTYPE and CDATA sections pass through as they are.

Minify, and limits

Minify removes whitespace-only text between tags, collapses whitespace inside text to single spaces and drops comments; it does not shorten attribute quotes or omit optional tags. A space that sits between two inline elements is removed too, so if it matters, put it inside a tag. The tool does not parse the DOM or repair markup: an unclosed element is reported, and indentation after it follows the tags as written. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

Last reviewed 19 September 2026. How results are checked: How we verify.