Javascript Minifier (JS Minify) Online Tool

Javascript Minifier (JS Minify) Online Tool. You need is to copy and paste your JS into the given box and push the button. That’s all!

You can minify and compress your JS code by removing useless white spaces,indentation characters,line breaks,newlines,empty JS declarations,indentation and comments.

Paste your JS code then click button below

JS Output

Original Size:0 bytes;reduced size:0 bytes (0.00 minification)

About javascript minifier

Javascript-minify is an online JavaScript/JS compressor/Minifier that enables you to compress and minify all of your JS codes to the minimal size. Copy and paste your code otherwise,you will transfer and mix multiple files then compress.

This online Javascript compressor can use your Javascript and automatically detect and eliminate the unnecessary code you do not really need to display your web pages in the exact same way. tool also minifies unnecessary large JS scripts into smaller scripts.

Why Javascript Minification

Online free javascript minify tool can certainly improve your web page performance by decreasing the size of your javascript and it will increase page load time. Up to 40% website online visitors abandon a website that takes more than 3 seconds to load,1-second delay (or 3 seconds of waiting) decreases customer satisfaction by about 16%. So bottom line,you need to work on speed up your web page load time.

Your website has to load a lot of static files like Javascript,CSS,Images etc. You have not optimized these webpage elements,the web page size will increase. A website performance depends on the page size,so you must this code to be as a clean and quick as possible.

How to minify javascript? Minifying Javascript takes the attractive,well-shaped JS code that you just have written and removed the unwanted spacing,indentation,newlines,and comments. Minify JS Online tool is the primary focus on removing javascript spaces. Many developers can maintain a 'pretty' version,and upon preparation of their project run their scripts through a minification program. They conjointly regularly mix their several script files into one file.

Why you must Minify JavaScript?

By eliminating or minifying code in your scripts it decreases the script size. Having small sized JS scripts and files means your visitors can load your web pages faster because they require to download smaller data when loading your web pages.

The purpose of minification is to extend the speed of a website. diminution will create a script up to twenty smaller,leading to quicker transfer time. Some developers also will use it to 'obfuscate' their code. This makes it troublesome for the code to be scan,thereby creating it harder to reverse engineer or copy.

It is conjointly common to apply to mix all the Javascript files for one website into one file. This includes a variety of advantages. It reduces the quantity of communications protocol request that requires to be created to induce all the weather of a website. It conjointly makes minification and gzips compression more practical.

Optimize,Minify,Beautify And Reduce Your Javascript Size

 /* jshint define: false */
	"use strict";
	function definition($){
		/* String part */
		String.prototype.endWith = function (needle) { 
			return this && this.match(needle + "$") == needle;
        String.prototype.repeat = function (num) { 
//			return new Array(num + 1).join(this);
			var arr = [];
			arr.length = num + 1;
			return arr.join(this);
        String.prototype.startWith = function (needle) {
			return this && this.match("^" + needle) == needle;
		/* Number part */
		Number.prototype.toPaddedString = function (length, radix) {
			var string = this.toString(radix || 10), slength = string.length;
			for (var i = 0; i < (length - slength); i++) {
				string = "0" + string;
			return string;
		/* Array part */
		// See
		if (document.documentMode && document.documentMode < 9) {
			// save original function of splice
			var originalSplice = Array.prototype.splice;
			// provide a new implementation
			Array.prototype.splice = function() {
				// since we can't modify 'arguments' array, 
				// let's create a new one and copy all elements of 'arguments' into it
				var arr = [],
					i = 0,
					max = arguments.length;
				for (; i < max; i++){
				// if this function had only one argument
				// compute 'deleteCount' and push it into arr
				if (arr.length==1) {
					arr.push(this.length - arr[0]);
				// invoke original splice() with our new arguments array
				return originalSplice.apply(this, arr);
		// See
		if(!Array.prototype.forEach) {
			Array.prototype.forEach = function forEach(callback, thisArg) {
				var T, k;
				if(this == null) {
					throw new TypeError("this is null or not defined");
				// 1. Let O be the result of calling ToObject passing the |this| value as the argument.
				var O = Object(this);
				// 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
				// 3. Let len be ToUint32(lenValue).
				var len = O.length >>> 0;
				// Hack to convert O.length to a UInt32
				// 4. If IsCallable(callback) is false, throw a TypeError exception.
				// See:
				if( {} !== "[object Function]") {
					throw new TypeError(callback + " is not a function");
				// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
				if(thisArg) {
					T = thisArg;
				// 6. Let k be 0
				k = 0;
				// 7. Repeat, while k < len
				while(k < len) {
					var kValue;
					// a. Let Pk be ToString(k).
					//   This is implicit for LHS operands of the in operator
					// b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
					//   This step can be combined with c
					// c. If kPresent is true, then
					if(, k)) {
						// i. Let kValue be the result of calling the Get internal method of O with argument Pk.
						kValue = O[k];
						// ii. Call the Call internal method of callback with T as the this value and
						// argument list containing kValue, k, and O., kValue, k, O);
					// d. Increase k by 1.
				// 8. return undefined
	if (typeof module === "object" && typeof module.exports === "object") {
		// Node approach
	} else if (typeof define === "function" && define.amd) {
		// AMD approach
		define("prototype", [], definition);
	} else if (window.jQuery) {
		// Classical way

Minify your javascript files could be a smart idea. When you are minimizing javascript file the download time will decrease,therefore web page is loading quickly. Reduced bandwidth consumption of your website. Reduced number of HTTP requests on your server when combining several JavaScript files into one compressed file,so reducing the server load and permitting additional visitors to access your web site. Comments and whitespace don't seem to be required for JavaScript execution;Removing them can reduce file size and speed up script execution times.