We've been hosted on Digital Ocean since 2013 and highly recommend it for your hosting too. Try it now!

CSS Minifier

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

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

No ads in .


To minify/compress your CSS perform a POST request to http://localhost:80/raw with the input parameter set to the CSS you want to minify.


wget --post-data='input=p { color : red; }' --output-document=- http://localhost:80/raw
wget --post-data="input=`cat style.css`" --output-document=style.min.css http://localhost:80/raw


curl -X POST -s --data-urlencode 'input=p { color : red; }' http://localhost:80/raw
curl -X POST -s --data-urlencode 'input@style.css' http://localhost:80/raw > style.min.css


POST http://localhost:80/raw?input=...

To see implementations in other languages see the other Language Examples pages below.

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: