CSS Minifier
Shrink CSS files.
Loading tool…
About CSS Minifier
Paste your stylesheet and this free tool instantly minifies it: it strips comments, collapses unnecessary whitespace and newlines, tightens the spacing around braces, colons, semicolons and commas, and removes the redundant last semicolon in every block. You see the original size, the minified size, and the percentage saved at a glance, plus a one-click Copy button.
It runs entirely in your browser using plain JavaScript, so your CSS is never uploaded to a server. Text inside quotes and url() values is left untouched, making it a safe, dependency-free way to shrink stylesheets for faster page loads.
Frequently asked questions
- Is this CSS minifier free to use?
- Yes, it is completely free with no sign-up, no limits, and no watermarks. Paste as much CSS as you like and minify it as many times as you want.
- Is my CSS uploaded to a server?
- No. All minification happens locally in your browser using JavaScript. Your stylesheet never leaves your device and nothing is sent to or stored on any server, so it is safe for private or proprietary code.
- What exactly does the minifier remove?
- It removes /* ... */ comments and unnecessary whitespace and newlines, collapses spaces around { } : ; and commas, drops the last semicolon before each closing brace, and trims duplicate semicolons. Content inside quotes and url() values is preserved.
- Will minifying change how my CSS behaves?
- No. This is a safe, conservative minifier: it only strips characters that have no effect on rendering. Values, selectors, and quoted strings are kept intact, so the minified output produces the same result as your original CSS.
- How much file size can I expect to save?
- It depends on how much your CSS relies on comments, indentation, and blank lines. Well-formatted, heavily commented stylesheets often shrink by 20 to 50 percent. The tool shows the exact original size, minified size, and percentage saved for your input.
- Can it handle large stylesheets and frameworks?
- Yes. It processes CSS of any size directly in the browser, so you can paste entire stylesheets or exported framework files. For very large files, minification runs in a fraction of a second on a typical computer.