HTML Minifier
Shrink HTML safely: remove comments and collapse whitespace while leaving pre, textarea, script and style contents untouched.
Open toolBeautify HTML with configurable indentation, line wrapping and attribute layout, without ever rendering or running it.
Paste minified or messy HTML and it is re-indented with js-beautify: each block element on its own line, nested elements indented by 2 spaces, 4 spaces or tabs, inline elements kept inline, and the contents of <pre> left exactly as they are. Optionally wrap long lines at 80 or 120 characters, or put each attribute on its own line for long tags.
Your HTML is treated purely as text. It is never rendered, loaded or executed, so it is safe to format untrusted markup, including pages with scripts. Everything runs in your browser. Your data is never uploaded, logged or stored.
Your code or text
HTML
Processed in this browser
Instant, in-browser. Nothing is uploaded.
Your result
Ready to download or copy
Paste your HTML.
Choose indentation, wrapping and attribute layout.
Copy or download the formatted HTML.
Zero-upload architecture
Free, with no sign-up or watermark · Your files stay on your device
Launch the app and add your file. There is nothing to install and no account to create.
Choose indentation, wrapping and attribute layout.
Copy or download the formatted HTML.
Shrink HTML safely: remove comments and collapse whitespace while leaving pre, textarea, script and style contents untouched.
Open toolEscape HTML special characters into entities, or decode entities like &amp; and &#169; back to readable text.
Open toolPretty-print or minify XML while keeping comments, CDATA and declarations intact, with exact line and column validation errors.
Open toolBeautify minified or messy JavaScript with configurable indentation and brace style, plus a syntax check that parses the code without running it.
Open tool