CSS Minifier

Online CSS Minifier/Compressor. Free! Provides an API. Simple Quick and Fast.

Written and hosted by Andrew Chilton (@andychilton) since 2009.

Curl

# minifying some CSS
curl -X POST -s --data-urlencode 'input=p { color : red; }' https://cssminifier.com/raw

# minifying a CSS file (e.g. style.css -> style.min.css)
curl -X POST -s --data-urlencode 'input@style.css' https://cssminifier.com/raw > style.min.css

Many people have sent language examples over the years, but we want more! We'd love to add more examples in your favourite programming language, so please send them our way. Email andychilton at that gmail place in the sky, tweet me @andychilton, or open an issue or PR on webdev-sh/cssminfier.com.

Click on the language of your choice to see an example: