Minify JS with Terser and see gzip savings. Runs entirely in your browser — nothing is uploaded.
6 answers to what people ask most about the JavaScript Minifier.
Paste the code and the minified version appears on the right. The size cards show how much smaller it is, both raw and gzipped.
It shortens local variable and function names, such as userCount to a, which cuts file size. Turn on Keep function & class names if your code depends on them, for example in stack traces.
Turn on Drop console.* calls. Terser then removes calls to console.log and the other console methods from the output.
The code has a parse problem, and the message shows the line and column with a pointer to it. If you are minifying plain scripts that use import or export, keep ES module switched on.
Pick the oldest version your users need. ES2020 is a safe modern default, while ES5 avoids modern syntax for very old browsers. Terser does not convert newer syntax downward.
Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.
Something not working? Tell us and we'll fix it.
Report an issue