HTML Formatter
Beautify HTML with configurable indentation, line wrapping and attribute layout, without ever rendering or running it.
Open toolShrink HTML safely: remove comments and collapse whitespace while leaving pre, textarea, script and style contents untouched.
The minifier is deliberately conservative. It removes comments (keeping Internet Explorer conditional comments if you want), collapses runs of whitespace to a single space, and removes whitespace between tags only where a block-level element makes it safe, so spacing between inline elements such as <b>a</b> <i>b</i> is preserved. The contents of <pre>, <textarea>, <script> and <style> are never touched.
Optionally, quotes can be removed from attribute values that don’t need them (off by default for compatibility). The size before and after is shown. It does not minify embedded CSS or JavaScript; use dedicated tools for those. 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 which optimisations to apply.
Check the savings, then copy or download the minified 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 which optimisations to apply.
Check the savings, then copy or download the minified HTML.
Beautify HTML with configurable indentation, line wrapping and attribute layout, without ever rendering or running it.
Open toolClean and minify SVG files by removing editor data, comments and excess precision.
Open toolRemove whitespace from JSON to make it as compact as possible, and see how much space you save.
Open toolMinify JavaScript with terser: compress, shorten local names and keep licence comments, with exact syntax errors and size savings.
Open tool