Options
- Compress — removes dead code and simplifies expressions.
- Mangle — renames local variables and functions to short names.
- Keep license comments — keeps
/*! ... */and @license comments. - ES module — enable for code that uses import/export.
The tool runs Terser, the minifier used by webpack, Vite and Rollup. Syntax errors are reported with the line and column.
Good to know
Mangling never renames global variables or object properties, so the public API of your script stays the same. Always test minified code before deploying.
Frequently asked questions
Is minified JavaScript faster?
It downloads faster and parses slightly faster. Combined with gzip or Brotli the savings are largest.
Why do I get a syntax error?
The code is not valid JavaScript (or uses import/export without the ES module option).
Is my code uploaded?
No, Terser runs in your browser.

