Shop Halloween costumes!
🔒 No upload — runs in your browser

HTML Formatter

Beautify or minify HTML in your browser: consistent indentation, inline elements kept together, tag-balance warnings. No upload, no signup.

Elements0
Unique tags0
Max depth0
Attributes0
Comments0
Size (in → out)0 B
Content of script, style, textarea, title and pre is copied byte-for-byte — the formatter never rewrites code inside it. Unclosed, mismatched or stray tags are reported below the result; the formatter does not invent closing tags.

How to Format and Minify HTML

This HTML formatter turns cramped or badly indented markup into readable, consistently indented HTML. Paste your markup into the box, pick two spaces, four spaces or a tab, and the cleaned copy appears in the second box as you type; short elements whose content is only inline text, links, emphasis or images stay on one line, so a paragraph does not explode into dozens of fragments. The same page works in the other direction: switch to Minify and every run of whitespace between block tags disappears, while the single spaces that still matter between inline elements are kept. Blocks such as script, style, textarea, title and pre are copied byte-for-byte, because re-indenting code or preformatted text would change what the browser renders. Under the result the tool lists every unclosed, mismatched or stray tag it found, together with element, attribute and nesting-depth counts, so broken markup can be fixed instead of guessed at. Everything runs locally in your browser: nothing is uploaded, there is no signup, and the result can be copied or downloaded as an .html file.

More free tools

Free online utility tools. No signup. No tracking.

Impressum · Sitemap · Some links contain affiliate advertising