CSS Minifier
Compress a stylesheet by removing comments and unneeded whitespace.
CSS Minifier
Stylesheets are render-blocking, so smaller is faster. This tool removes comments and unnecessary whitespace from your CSS to shrink the file.
How to use CSS Minifier
- Paste your CSS into Enter your CSS Code Here.
- Click Minify Code.
- Copy the minified stylesheet.
When it comes in handy
- Preparing a production stylesheet for a small site.
- Shrinking inline CSS in email templates and landing pages.
- Testing how much a stylesheet can be reduced.
Frequently asked questions
Should I keep the original file?
Yes. Minified CSS is hard to read, so always edit the original and re-minify when you deploy.
Will it merge or rewrite my rules?
No. It removes characters you do not need but keeps your selectors and declarations as they are.
Related guides
-
What Is GZIP Compression, and Is It Working on Your Site?
How GZIP and Brotli compression make pages load faster, what should and should not be compressed, how to switch it on, and how to check it is working.
-
JSON vs XML vs CSV: Choosing the Right Data Format for Your Project
JSON, XML and CSV each solve a different problem. Here is how to pick the right one, plus tools to convert and validate between them.
-
How to Fix Invalid JSON: The 8 Most Common Errors
Trailing commas, single quotes, unquoted keys and the other mistakes that break JSON, with before-and-after examples and a quick way to find the problem.