Advertisement

JavaScript Minifier Online – Minify JS Free with Terser

Minify JavaScript online using Terser. Remove comments, compress expressions, and mangle variable names to reduce JS file size. 100% browser-based — your code stays private.

JavaScript Minifier

JS Input
Minified Output

Ready to minify

Paste your JavaScript on the left, then click Minify JavaScript

What is JavaScript Minifier?

Compress JavaScript files using Terser, the industry-standard JS minifier. Remove comments, fold constants, eliminate dead code, and optionally mangle variable names for maximum reduction. Compare original vs. minified size and download the result instantly. Everything runs in your browser — nothing is uploaded.

javascriptminifiertersercompressoptimizejs

JavaScript Minifier Features

Powered by Terser

Uses the same engine as Webpack and Vite for production-grade JavaScript minification.

Name Mangling

Optionally shorten variable and function names to single letters for maximum compression.

Size Comparison

See original vs. minified byte count and percentage saved after each run.

Advertisement

JavaScript Minifier FAQ

Yes — everything runs in your browser using Terser. Your code is never sent to any server.

Compress simplifies expressions and removes dead code. Mangle shortens variable and function names to single characters. Both reduce file size; mangling is more aggressive.

Yes — Terser supports modern JavaScript including ES2022+ syntax. For JSX, transform to plain JS first (e.g., with Babel) before minifying.

Typical savings are 40–70% with compression and mangling enabled. Well-commented, heavily formatted code sees the biggest reductions.