Format (beautify) or minify HTML — safely, entirely in your browser.
Input:
Formatted:
This tool removes HTML comments and unnecessary whitespace BETWEEN tags. It does not falsely claim to validate your HTML against the full standard, and it never touches the meaningful text content of your page or the content of protected blocks like <script>, <style>, <pre>, or <textarea>.
It reformats your HTML with consistent indentation so nested elements are clearly visible -- each tag's children are indented one level deeper, making the structure easy to read.
HTML comments and unnecessary whitespace between tags. It deliberately does not rename attributes, strip tags, or restructure your markup -- only whitespace and comments are removed, so the result is predictable and safe to review.
No -- meaningful text between tags is left exactly as written. Only whitespace that exists purely BETWEEN tags (not inside a text node's own words) is collapsed, so "Hello World" never becomes "HelloWorld".
Those blocks are protected before any whitespace collapsing happens, since whitespace inside them can be meaningful (inside <pre>/<textarea>) or syntactically significant (inside <script>/<style>). Script and style blocks are still minified using this tool's own JavaScript/CSS logic; pre and textarea content is left completely untouched.
No -- this tool formats and minifies; it does not check your markup against the full HTML specification. Obvious structural issues may still produce a readable (if imperfect) result rather than a validation error.
No. Every transformation runs locally in your browser using JavaScript. Nothing you paste here is sent to Brekzy or stored anywhere.
Explore Brekzy's growing collection of free calculators, converters, AI tools, and practical resources.