This tool allows you to minify and compress your JavaScript code, it removes all extra white spaces, newlines, comments, useless code and optimizes variable names.
Copy and paste, upload, drag and drop a JS file or directly type in the "Your JavaScript code" editor below.
If you drag and drop multiple JS files at the same time, they will be combined into a single compressed file.
You can see the user guide to help you to use this JavaScript minifier.
Fill "Your JavaScript code" editor with your JavaScript source code. You have several possibilities:
Click on "Download" button in order to export minified JavaScript.
Click on "Copy to clipboard" button in order to copy minified code to clipboard.
Minification is the process of removing all unnecessary characters in order to reduce or compress JavaScript code, in order to decrease the JavaScript file size. It removes the spacing, indentation, newlines, and comments. The minification can also rename local variables, the longer variable names will be shortened. Minification makes more difficult to read JavaScript source code.
Example:
"Pretty" Source code:/* Load date from URL */ function loadFromURL() { var url = document.getElementById('url').value; services.http.get(url, function (data) { if (currentEditor && data) { currentEditor.setValue(data); } dialogLoadFromURL.dialog( "close" ); }); }
Developers maintain a pretty version of their source code, and for deployment they use a minification program.
JavaScript minifier is a SEO tool which can help boost your site speed (It is a SEO factor). The compression of the web pages by the web servers limits the interest of the minification of the sources.
This tool allows to minify js online and also compress javascript online. Your source code will be reduce, and will load faster by browsers.
It uses the Terser library (fork of uglify-es).
This webpage allows you to use Terser online. But for a professional project, this process of minification must be automated and scripted.
Comments
Ikram-2019-04-21 10:56
Imre-2021-03-30 10:13
Mauro-2021-09-14 15:20