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
or drag & drop files here (.css) — several files are joined in order. Read in your browser, never uploaded.
Minified CSS
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

  1. 1Paste your CSS, or upload a .css file.
  2. 2Copy or download the minified CSS.
  3. 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.

Related tools

Continue with these related webmaster tools.