Skip to content
Web4tools

JavaScript Minifier

Shrink JavaScript for production with the same minifier used by major bundlers.

Runs in your browserNo accountNo watermark

In short

To minify JavaScript, paste your code and copy the minified result. It's processed by Terser, the minifier behind webpack and Vite, which removes comments and whitespace, shortens local variable names and simplifies expressions, typically cutting size by 30–60%.

How to use the JavaScript Minifier

  1. 1Paste or type your input in the left box (or click "Try an example").
  2. 2Adjust the options if needed. The result updates as you type.
  3. 3Copy the result or download it as a file.

Minification is safe

Terser only applies transformations that keep the code's behaviour identical. Global names and object properties are left alone, so your code keeps working when other scripts reference it.

Frequently asked questions

Does it support modern JavaScript?

Yes, ES2024 syntax including classes, async/await, optional chaining and modules.

Can it minify TypeScript?

No. Compile TypeScript to JavaScript first.

Is my data sent anywhere?

No. Everything runs in your browser. What you paste is never uploaded, logged or stored, so it's safe for code, tokens and private content.

Last updated