Skip to content
FizzKit

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.

Runs locally in your browser
For long source files, open fullscreen for a wider view
Target
File
Source
649 chars · 32 lines
Minified
Output will appear here…
Input
649 B
Minified
0 B
Saved
—
Compression
—
Gzip (output)
—
Gzip (input)
—

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.

How to use JavaScript Minifier

  1. 1Paste JavaScript and choose Minify (terser) or Beautify (prettier); for TS/JSX use Beautify.
  2. 2Pick the ECMAScript target and toggle compress, mangle, module, top-level, keep names and console/debugger dropping.
  3. 3List reserved names that must not be mangled and decide which comments to keep.
  4. 4Enable the source map to download app.min.js and app.min.js.map with matching names.
  5. 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.

Frequently asked questions

No. Terser and Prettier run entirely in your browser; nothing is uploaded.