ClickZM

Guides ·

How to use JavaScript Minifier

JavaScript Minifier. Minify JS with Terser. Terser is the minifier used by webpack and Vite.

Open JavaScript Minifier

The short answer

To minify JavaScript, paste your code and click Minify: Terser removes whitespace and comments, shortens variable names and drops dead code, supporting modern ES2024 syntax. Syntax errors are reported with the line.

It runs in your browser. What you enter is not uploaded.

How to use it

Type or paste your input into the JavaScript Minifier.

Choose any options you need.

See the result update instantly.

Copy the result or download it.

Limits worth knowing

Will it break my code? Terser is the minifier used by webpack and Vite. Code that relies on function names (fn.name) may need 'Keep function names' ticked.

Can I get a source map? Yes. Tick 'Source map' to download one alongside the minified file.

Sponsored

A recommended offer

Opens in a new tab. It is separate from the calculators.

Continue

Advertisement