Code Tower · room 27

JavaScript Minifier

Minify JavaScript with Terser.

🔒 Processed in your browser · No upload · No sign-up

Minify JavaScript with Terser

Shrink JavaScript for production using Terser, the minifier behind webpack, Vite and Rollup. It removes whitespace and comments, shortens variable names, inlines constants and drops unreachable code. Modern syntax (ES2024, classes, async/await, optional chaining) is fully supported.

How much smaller will my file get?

Typically 40–70% smaller before compression. The size line under the editor also shows the gzipped size, which is what your users actually download from a server with compression enabled.

Is it safe?

Terser's default transformations preserve behaviour. Enable "ES module" only for code loaded with type="module" (it allows top-level renaming), and keep license comments if your dependencies' licenses require attribution. Your code is processed locally and never uploaded.