JavaScript Minifier client-side ?
How to use JavaScript MinifierShrink your JavaScript with Terser: strip whitespace and comments, shorten variable names and apply optimizations, with several compression levels (safe, standard, aggressive). A beautify mode does the opposite, reformatting minified code to make it readable. The percentage of bytes saved is shown. ES6+ compatible. Everything runs in your browser.
?
Shrink your JavaScript with Terser: strip whitespace and comments, shorten variable names and apply optimizations, with several compression levels (safe, standard, aggressive). A beautify mode does the opposite, reformatting minified code to make it readable. The percentage of bytes saved is shown. ES6+ compatible. Everything runs in your browser.
Minify or beautify JavaScript with Terser.
How to use JavaScript Minifier
Shrink your JavaScript with Terser: strip whitespace and comments, shorten variable names and apply optimizations, with several compression levels (safe, standard, aggressive). A beautify mode does the opposite, reformatting minified code to make it readable. The percentage of bytes saved is shown. ES6+ compatible. Everything runs in your browser.
Frequently asked questions
Can minification break my code?
Aggressive mode (mangle, drop_console) can change behavior if your code relies on global variable names or console output. Use the “safe” or “standard” level if unsure.