This site has been acquired by Toptal.com.
(Attention! API endpoint has changed)

CSS Minifier

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

API

To minify/compress your CSS perform a POST request to https://www.toptal.com/developers/cssminifier/raw with the input parameter set to the CSS you want to minify.

wget

wget --post-data='input=p { color : red; }' --output-document=- https://www.toptal.com/developers/cssminifier/raw
wget --post-data="input=`cat style.css`" --output-document=style.min.css https://www.toptal.com/developers/cssminifier/raw

curl

curl -X POST -s --data-urlencode 'input=p { color : red; }' https://www.toptal.com/developers/cssminifier/raw
curl -X POST -s --data-urlencode 'input@style.css' https://www.toptal.com/developers/cssminifier/raw > style.min.css

POST

POST https://www.toptal.com/developers/cssminifier/raw?input=...

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

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