JavaScript Minifier

Minify JavaScript with Terser: compress, mangle names and strip comments.

What does a JavaScript minifier do?

A JavaScript minifier makes scripts smaller by removing whitespace and comments, shortening local variable names (mangling) and simplifying code (compression), so pages download and run faster.

How to use the JavaScript Minifier

    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.