Input
Output
Before : 1KB
,
After : 0.5KB
,
Saving : 50%
JS beautify tools and minify tools online provide one click JS beautification function and one click JS minimization function.
- Open : Open the local JS(JavaScript) file, and the supported file encoding is UTF-8.
- Beautify : Beautify / Format the input JS(JavaScript).
- Minify : Compress the input JS(JavaScript).
- Download : Download the output JS(JavaScript) locally. The file name is handled.js. The file encoding is UTF-8.
- Related tools : Javascript Obfuscator Online.
-
JS Minify Features :
- remove superfluous whitespace.
- remove superfluous semicolons.
- horten true, false, and undefined to !0, !1 and void 0.
- move var declarations to the top of the global/function scope (if more than one).
- collapse if/else statements to expressions.
- minify conditional expressions to simpler ones.
- merge sequential expression statements to one, including into return and throw.
- remove superfluous grouping in expressions.
- shorten or remove string escapes.
- convert object key or index expression from string to identifier or decimal.
- merge concatenated strings.
- rewrite numbers (binary, octal, decimal, hexadecimal) to shorter representations.