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.
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
CSS Minifier
Minify CSS safely — strings, url() and calc() preserved — with gzip size and duplicate-selector merging.
JSON Minifier
Minify JSON, strip nulls, measure gzip size and encode as Base64 or URL-safe text.
HTML / CSS Prettifier
Beautify or minify HTML, CSS, SCSS, Less, JS, TS, JSON, YAML, Markdown and more — with preview and lint.
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.