CompressJavaScript is a free tool that you can use to compress/minify your JavaSript files online. It can make your web pages load faster by decreasing the size of the files served. This is an agressive compressor but safe to use at the same time resulting to a script that will function identically to the uncompressed code.

How does it work?

It works by removing all unnecessary white-spaces, semicolons, quotes, altering booleans, stripping comments and shrinking local variable names. It also removes line breaks making otherwise thousand lines of code into a single line.

CompressJavaScript uses a modified version of UglifyJS 3 for all JavaScript compression. Based on multiple tests, it is currently the best when it comes to reducing the file size of JavaScript files beating JSMin, Dean Edwards' Packer and YUICompressor by a significant margin.




  1. You should keep a copy of the original .js file just in case you need to modify it again in the future.
  2. Paste your JS code inside the input box (left side). Make sure to NOT include <script> tags.
  3. Click the "Compress" button and wait for it to finish compressing.
  4. Once finished, the minified JavaScript code should appear in the output box (right side).


CompressJavaScript compressor is fully compatible with Google Chrome, Firefox, Opera, Safari, IE 10+, Edge and other modern browsers as long as JavaScipt is enabled.