CSS Minifier

Strip whitespace and comments from CSS to reduce file size.

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.

Website Management Tools

About the CSS Minifier

CSS Minify removes spaces, line breaks and comments from your stylesheet without changing how it works. The result is a smaller file that downloads faster. You can paste your code or load a file, then copy or download the minified version.

CSS blocks a page from appearing until it has been downloaded, so smaller stylesheets can help a page display sooner. The saving is usually modest, but it is a simple gain, especially on large stylesheets.

Keep your original, readable file for editing. Minified code is hard to work with, so make your changes in the original and minify it again. Many hosts and caching plugins can do this automatically, in which case you do not need to do it twice.

How to use this tool

  1. 1Paste your CSS or load your file.
  2. 2Copy or download the minified code.
  3. 3Replace the file on your website.
  4. 4Clear your cache and check that the page looks right.

Best-practice tips

  • Keep a copy of the original for future edits.
  • Removing unused CSS saves far more than minifying.
  • Turn on GZIP or Brotli as well for a much bigger saving.

Answers

CSS Minifier FAQs

It should not. It removes only the characters a browser does not need. Test the page afterwards to be sure.

Related tools

Continue with these related website management tools.