Paste your CSS to remove comments and extra spaces and get a smaller file that loads faster.
Loading the tool…
What minifying does
| Before | After |
|---|---|
| color: #ffffff; | color:#fff |
| padding: 0px 16px; | padding:0 16px |
| margin: 0.5em auto; | margin:.5em auto |
| /* comments */ | (removed) |
| Line breaks and indents | (removed) |
Is it worth it?
Minifying usually cuts CSS by 15% to 30%. Combined with gzip or Brotli compression on your server, it helps pages load faster, especially on mobile. Many build tools and WordPress caching plugins minify automatically; this tool is handy for one-off files, snippets and email templates.
Good practice
- Keep your original, readable file and minify a copy.
- Comments starting with /*! are kept for licence notices.
- Test the page after replacing the file.
Frequently asked questions
Does minifying change how CSS works?
No. It only removes characters browsers don’t need.
Can I un-minify CSS?
You can reformat it, but removed comments can’t be recovered, so keep your original.
Is my CSS uploaded?
No, it’s minified in your browser.
Should I also combine CSS files?
Fewer files can help, but with HTTP/2 it matters less than it used to.
Sources
Last updated: