FileConverterPro

JS Minifier

Minify JavaScript code online for free using Terser. Removes whitespace, shortens variable names, eliminates dead code. No signup.

Runs entirely in your browser — files never uploaded

How to use JS Minifier

  1. 1. Paste your JavaScript. Paste or type your JS code into the input textarea.
  2. 2. Configure options. Toggle 'Mangle variable names' to shorten local variable names for extra savings.
  3. 3. Click Minify. The tool uses Terser to compress your code. Copy the result or check the size reduction.

FAQ

Is my code sent to a server?

No. Terser runs entirely in your browser via WebAssembly/JS — nothing is uploaded.

What does 'mangle' do?

Mangling renames local variables to shorter names (e.g., a, b, c). It doesn't rename globals or exported names.

Will minification change my code's behavior?

Terser is semantics-preserving. It removes dead code and shortens names but doesn't alter logic.

What if I get a syntax error?

Terser will report a parse error if your input isn't valid JavaScript. Fix the syntax and try again.

Does it support TypeScript?

No. Terser works with plain JavaScript. Strip types first (e.g., via the TypeScript compiler) before minifying.

Related tools

Advertisement