JavaScript Minifier

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

JavaScript Minifier

Best JavaScript Minifier to Minify JS Online

Input

Output


How to Use JS Minifier

  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 (top side). Make sure to NOT include <script> tags.
  3. Click the “Compress JS” button and wait for it to finish compressing.
  4. Once finished, the minified JavaScript code should appear in the output box (bottom side).

How does JavaScript Minifier work?

JavaScript Minifier 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.

JavaScript Minifier/Compressor 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 YUI Compressor by a significant margin.

As always, you must create a backup first before using the JavaScript Minifier. We are not liable for any loss or damage to your code. Also you might want to have the original copy of your JavaScript for future development.

Why should I Minify JavaScript?

There is so much room for JS minification. Typically you can reduce the size of the file by 90% by simply removing unnecessary white-spaces, semicolons, quotes, altering boolean, stripping comments and shrinking local variable names. Smaller JavaScript file size means less bandwidth consumption, so by compressing you’re not only saving up money on hosting but you’re also making your site load faster.

Compatibility

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

Useful Tools

I like making useful client-side JavaScript apps. Please check out my other useful tools.