JavaScript Minifier
Minify JavaScript with Terser or beautify JS/TS with Prettier — with real gzip sizes.
Output will appear here…
The ECMAScript target lets terser use newer syntax for smaller output (e.g. arrow functions, optional chaining at ES2020+). Pick ES5 only if you must support very old browsers — it does not transpile, it just avoids emitting newer constructs.
Related tools
How to use JavaScript Minifier
- 1Paste JavaScript and choose Minify (terser) or Beautify (prettier); for TS/JSX use Beautify.
- 2Pick the ECMAScript target and toggle compress, mangle, module, top-level, keep names and console/debugger dropping.
- 3List reserved names that must not be mangled and decide which comments to keep.
- 4Enable the source map to download app.min.js and app.min.js.map with matching names.
- 5Compare input, output and real gzip sizes in the stats.
About JavaScript Minifier
Compress JavaScript in your browser with Terser: mangle, compress, drop console and debugger, pick an ECMAScript target, keep function and class names, reserve identifiers and emit source maps. Or switch to Beautify to format JavaScript, JSX, TypeScript and TSX with Prettier. Every run reports the real gzip size (CompressionStream), not an estimate.
JavaScript Minifier is part of FizzKit — a collection of focused developer and ad-tech tools. Because everything runs locally, it works offline once loaded and never exposes your data to a remote server.