Skip to content
LovelyTools
EN

CSS Minifier

Minify and optimise CSS with rule merging, powered by CSSO.

Processed locally on your device — nothing is uploaded.

About the CSS Minifier

Smaller stylesheets download and parse faster, which helps first paint and Core Web Vitals. This minifier uses CSSO, a mature open-source optimiser that does more than strip whitespace: it shortens colours (#ffffff → #fff), removes redundant units (0px → 0) and can merge duplicate selectors.

Licence comments that start with /*! are kept by default, as many open-source licences require.

How to use the CSS Minifier

  1. Paste CSS or open a .css file.
  2. Choose structural optimisation and comment handling.
  3. Press Convert and copy or download the minified CSS.

Features

  • Whitespace and comment removal
  • Value shortening
  • Duplicate rule merging
  • Keeps licence comments
  • Clear parse errors

Supported formats

  • CSS
  • .css

Frequently asked questions

Is my code uploaded?

No. Formatting and minifying run in your browser, so proprietary code and secrets never leave your device.

Can structural optimisation break my styles?

Rarely. CSSO preserves the cascade, but if something looks different, turn off “Merge duplicate rules” for a pure whitespace minify.