CSS Minifier
Remove comments and collapse whitespace from CSS in safe mode — strings, custom properties and selectors stay intact, with a size comparison.
How to use
- Paste your CSS.
- Read the minified output and the saved percentage.
- Copy the result into your production stylesheet.
Example
Input: /* comment */ .btn { color: #fff; padding: 8px; }
Output: .btn{color:#fff;padding:8px}
How it works
Comments and unnecessary whitespace are removed from the stylesheet and declarations are compacted, producing valid CSS that behaves identically to the original.
Limits & compatibility
- Safe mode: no rule rewriting, colour conversion or declaration merging.
- The contents of quoted strings (content, fonts) are never touched.
- Not a parser-based optimizer — heavy scaffolding may minify less.
Privacy
Your CSS never leaves the browser. There is no server call, no storage and no logging of content.
Related tools
Questions about CSS Minifier
Is my input private?
Yes. This tool runs entirely in your browser — your input never leaves your device, is never uploaded to a server and is never stored.
How accurate is the result, and what are the limits?
The tool page states its formula and limits openly. Check them before relying on a result, and verify anything consequential — financial, legal, medical or safety-critical — against an authoritative source.
What happens to files I open with this tool?
Files are processed locally in your browser and never uploaded; closing the tab discards them. Text tools never store what you paste — it lives only in the page while you use it.