CSS Minifier
Strip whitespace and comments while protecting strings, url() and calc()
Minified CSS will appear here
Paste CSS above to begin
Advertisement
Minify CSS by removing comments, collapsing whitespace, and simplifying zero units while protecting strings, url(), and calc()-family expressions.
Strip whitespace and comments while protecting strings, url() and calc()
Minified CSS will appear here
Paste CSS above to begin
Reduce standard CSS file size by stripping comments, collapsing whitespace, and simplifying zero values. String literals, url() contents, and calc()/clamp()/min()/max() expressions are protected from the minification pass. Results appear instantly as you type. Download the minified file or copy it to the clipboard. Compile SCSS or PostCSS to CSS before using this tool; processing is client-side.
What you get with CSS Minifier.
Output updates live as you type or paste — no button press needed.
String literals, url() paths, and calc() expressions are protected from being altered.
Shows original vs. minified byte count and exact percentage saved.
Follow these steps to get the best results.
Paste a stylesheet or snippet — minified output appears instantly as you type.
See original vs. minified bytes and the percentage saved.
Copy the minified CSS to your clipboard or download it as a file.
Advertisement
Common questions about CSS Minifier.
No — comments and whitespace are removed safely, and the tool specifically protects string values, url() paths, and calc()/clamp()/min()/max() expressions from being altered, since collapsing spaces inside those can change their meaning.
It works on any valid CSS output. If you use SCSS or PostCSS, compile to plain CSS first and then run it through the minifier.
Well-formatted stylesheets typically shrink 20–40% from comment and whitespace removal. Combined with gzip/Brotli on the server, savings compound further.
It automatically rewrites values like 0px, 0em, 0rem to just 0. CSS specifications allow unitless zero for length values, saving a few bytes per occurrence. This happens automatically and isn't a separate toggle.
Advertisement
Comments
Share feedback, ask questions, or help others use this tool.
Join the discussion
Sign in to comment, reply, and report inappropriate content.