CSS Minifier
Free CSS minifier: compress CSS by removing spaces, line breaks and comments, and see how much smaller the file gets. Licence comments are kept.
- 100% free
- No sign-up
- Runs in your browser
Paste, upload or load CSS code to minify...
Only comments and spaces that cannot change the result are removed; text inside strings is kept exactly. Licence comments (/*! … */) are kept.
Webmaster Tools
About the CSS Minifier
The CSS Minifier makes stylesheets smaller by removing everything a browser does not need: spaces, line breaks, comments and extra semicolons. The styles work exactly the same, but the file downloads faster.
Paste your CSS or upload a file, and the minified version appears with the percentage saved. Licence comments marked /*! … */ are kept, as their licences usually require.
Everything runs in your browser, so your text or code never leaves your device.
How to use this tool
- 1Paste your CSS, or upload a .css file.
- 2Copy or download the minified CSS.
- 3Replace the file on your site, keeping the original for editing.
Best-practice tips
- Keep your readable original and minify a copy for the live site.
- Many build tools, caching plugins and CDNs can minify automatically.
- Minifying and GZIP or Brotli compression work together for the smallest files.
Minify vs compress
Minifying removes characters from the file itself. Compression (GZIP or Brotli) packs the file for the trip from the server to the browser. Do both: a minified, compressed stylesheet is usually far smaller than the original. Check your server’s compression with the GZIP & Brotli Compression Checker, and minify scripts with the JavaScript Minifier.
Answers
CSS Minifier FAQs
It removes spaces, line breaks and comments so the file is smaller and loads faster, without changing how the styles work.
It should not. Test the page after replacing the file, and keep your original.
No. It is minified in your browser.
Yes, with no sign-up.
Related tools
Continue with these related webmaster tools.
Meta Tag Generator
Free meta tag generator: create your title tag, meta description, robots and canonical tags with a live Google search preview and character counter.
View Page Source
Free page source viewer: see the HTML source code of any website with line numbers, a search filter and tag counts. Works on any device, including phones.
XML Sitemap Generator
Free XML sitemap generator: crawl your website (up to 5,000 pages) or paste a URL list and download a valid sitemap.xml. Leaves out redirects, errors and noindex pages.