Free CSS Minifier
Shrink a stylesheet down to a single compact line by stripping comments and whitespace, entirely in your browser.
How to minify CSS
-
1
Paste your CSS
Paste a hand-written or formatted stylesheet into the input box.
-
2
Click "Minify →"
Comments and whitespace are stripped, leaving a single compact line.
-
3
Copy the result
Click "Copy output" to grab the minified CSS for production.
Example use cases
Shrinking CSS for production
Cut file size before shipping a stylesheet when you don't have a build step or bundler set up.
Pasting CSS into a size-limited field
Fit a stylesheet into a character-limited CMS field or inline <style> block.
Comparing before/after file size
See how much whitespace and comments were adding to a stylesheet's footprint.
Frequently asked questions
What does this minifier do?
It strips comments, removes line breaks and indentation, and collapses the spacing around selectors, braces, colons, and semicolons, so the same rules take up far less space.
Does it rename classes or restructure my CSS?
No. It only removes whitespace and comments — selector names, property order, and values are left exactly as written, so the visual result is unchanged.
Does it validate my CSS?
No. It reformats structure only — it doesn't check that property names or values are valid. Use the CSS Validator to check for structural issues first.
Is my CSS uploaded anywhere?
No. Minifying happens locally in your browser using JavaScript — nothing you paste is sent to a server.