This site has been acquired by Toptal.com.

JavaScript Minifier

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

API

To minify/compress your JS perform a POST request to https://www.toptal.com/developers/javascript-minifier/raw with the input parameter set to the JavaScript you want to minify.

wget

wget --post-data='input=console.log( 1 );' --output-document=- https://www.toptal.com/developers/javascript-minifier/raw
wget --post-data="input=`cat main.js`" --output-document=main.min.js https://www.toptal.com/developers/javascript-minifier/raw

curl

curl -X POST -s --data-urlencode 'input=console.log( 1 );' https://www.toptal.com/developers/javascript-minifier/raw
curl -X POST -s --data-urlencode 'input@main.js' https://www.toptal.com/developers/javascript-minifier/raw > main.min.js

POST

POST https://www.toptal.com/developers/javascript-minifier/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: