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

JavaScript Minifier

Online JavaScript Minifier/Compressor. Provides an API. Simple and Fast.

Curl

# minifying some JavaScript
curl -X POST -s --data-urlencode 'input=console.log( 1 );' https://www.toptal.com/developers/javascript-minifier/raw

# minifying a JS file (e.g. ready.js -> ready.min.js)
curl -X POST -s --data-urlencode 'input@ready.js' https://www.toptal.com/developers/javascript-minifier/raw > ready.min.js

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