HTML minifier
Strip comments and whitespace, and shrink inline CSS and JS too.
How it works
- 01Paste your HTML or drop an .html file into the box.
- 02Choose what to strip: comments, whitespace, and inline CSS and JavaScript.
- 03Copy the minified page or download it as a .min.html file.
Questions
›Will minifying change how my page looks?
It is built to be careful. Whitespace is only removed where browsers ignore it, such as between block elements like div and p. A single space stays between inline elements like links and bold text, and the content of pre, textarea, script and style is never reflowed. If your CSS sets white-space: pre on other elements, turn off Collapse whitespace.
›Are conditional comments kept?
Yes. Regular comments are removed, but Internet Explorer conditional comments like <!--[if IE]> are kept as they are.
›What happens to inline scripts and styles?
Style blocks and style attributes are minified with CSSO, and script blocks with Terser. JSON scripts such as structured data are compacted. A script with a syntax error is left untouched and you are told which line to check. Scripts of other types, like templates, are left alone.
›Is my data uploaded anywhere?
No. This tool runs entirely in your browser, and Rounder never sends what you type or drop in to a server, ours or anyone else's. Once the page has loaded, along with any AI model the tool uses, it even works offline.