JavaScript Minifier client-side
?
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

Minify or beautify JavaScript with Terser

JavaScriptMinifyTerserCompressionES6

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