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.

Node.js

Using just core packages (no packages from npm):

var querystring = require('querystring');
var http  = require('http');

var query = querystring.stringify({
    input : css
});

var req = http.request(
    {
        method   : 'POST',
        hostname : 'https://www.toptal.com/developers/cssminifier/',
        path     : 'raw',
    },
    function(resp) {
        // if the statusCode isn't what we expect, get out of here
        if ( resp.statusCode !== 200 ) {
            console.log('StatusCode=' + resp.statusCode);
            return;
        }

        resp.pipe(process.stdout);
    }
);
req.on('error', function(err) {
    throw err;
});
req.setHeader('Content-Type', 'application/x-www-form-urlencoded');
req.setHeader('Content-Length', query.length);
req.end(query, 'utf8');

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