CSS Minifier
Compress CSS by removing dead rules, comments and whitespace.
Processed locally in your browser. Nothing you enter is uploaded or stored.
- Removes empty and duplicate rules, not just whitespace and comments.
- Collapses redundant values (units on zero, shorthand-able declarations).
- Runs in your browser; styles aren't uploaded.
Why this is private
- Processed locally in your browser. Nothing you enter is uploaded or stored.
- Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
- Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.
Overview
Minifies CSS using csso — a real minifier that removes dead rules, duplicate declarations and unnecessary values (like collapsing `0px 0px` to `0`), not just whitespace.
How to use it
- 1Paste CSS.
- 2The minified output updates automatically.
- 3Copy it or download as .css.
Examples
Formatted to minified
Input
a { color: red; padding: 0px 0px; } b {}
Output
a{color:red;padding:0}
Frequently asked questions
What people use it for
Shrink a stylesheet before deploying itCompress hand-written or generated CSS that isn't going through a build pipeline.
Clean dead weight out of an exported stylesheetStrip empty rules a design tool or framework left behind.
See how much smaller minification makes your CSSCheck the real savings before adding a build step.
Related guides
- How to read JSON with a tree viewerA tree viewer turns a wall of brackets into a structure you can expand, search and copy paths from. Here's how to use one effectively.
- JSON parse errors explained: 'Unexpected token', 'Expected comma or brace', and the restWhat each common JSON error message actually means, the usual cause, and how to find the spot fast using line and column.
- How to format JSON (and actually understand the errors)JSON looks like a JavaScript object but follows stricter rules. Here's what those rules are and how to read the errors when they're broken.
Related tools
All developer toolsReady to use CSS Minifier?
CSS Minifier