CSS and JavaScript Minifier
Reduce the size of your stylesheets and scripts by removing unnecessary comments, spaces and line breaks. The minifier is conservative and safe: it preserves strings, template literals and regular expressions, and respects the line breaks JavaScript needs.
Settings
For JavaScript, unnecessary comments and whitespace are removed without breaking the code: strings, template literals and regular expressions are preserved. Everything is processed in your browser.
Minified code
Paste your CSS to minify it.
Related tools
Frequently asked questions
Why doesn't it minify as aggressively as terser?+
It prioritizes not breaking your code: it safely minifies comments and whitespace without changing meaning. That's enough for 99% of use cases.
Does it respect automatic semicolon insertion?+
Yes. In JavaScript, line breaks between statements are preserved so ASI isn't altered (e.g. after return or throw).

