Home / Developer Tools / JavaScript Minifier
Developer Tools

JavaScript Minifier

Minify JavaScript in your browser with Terser 5 parser compression when available, a conservative local fallback, exact byte and gzip savings, file import and one-click download.

Paste JavaScript. Ship a smaller script.

Paste or drop a .js/.mjs file, minify it, inspect raw and gzip savings, then copy or download the result. Your JavaScript is never uploaded by WebToolArc.

Browser-local JavaScriptLoading Terser…
0 chars
Drop a .js or .mjs file hereor paste code directly below
Local file read
—
Original—UTF-8 bytes
Minified—UTF-8 bytes
Saved—No output yet
Original gzip—Actual browser gzip
Minified gzip—Actual browser gzip
Ready·Balanced compresses and mangles local names; module/top-level assumptions stay off unless you enable them.
Paste JavaScript or choose a .js/.mjs file.
Advanced minification options
Engine behavior: Balanced and Aggressive use Terser 5.51.2 AST parsing/compression when its browser bundle is available. Safe disables compress + mangle but still uses the parser/printer. If both optimizer CDNs are unavailable, WebToolArc switches to a conservative line-preserving local fallback instead of pretending regex cleanup is AST optimization.
Keyboard: Ctrl/Cmd+Enter minifies and Ctrl/Cmd+S downloads the current output.
What these switches can change
Module and top-level are assumptions. Enable them only when the file really is an ES module or top-level names are not part of a public/global API.
Dropping console calls is behavior-changing. It can remove argument evaluation along with logging. Keep it off unless that is intentional.
Name mangling and reflection can conflict. Code that depends on Function.name/Class.name or string-based lookups may need “Keep function & class names”.
Privacy, limits and deployment checks
Private input. Your JavaScript stays in this tab. Loading the optional Terser library is a normal script request; your pasted code is not posted to that CDN.
JavaScript only. JSX, TypeScript and multi-file bundling/tree-shaking belong in a compiler or bundler pipeline.
Keep readable source. Treat minification as a build artifact. Run tests against the minified file before deploying it.

Parser-backed by default

Balanced mode uses Terser’s JavaScript parser, compressor and mangler instead of relying on whitespace-only regex replacements. Parser errors are surfaced before a result is accepted.

Measure raw and gzip

Character counts can hide multibyte text. The cards use exact UTF-8 bytes and the browser’s real CompressionStream gzip output when supported.

Safe escape hatch

Safe keeps compression and mangling off. If the optional optimizer cannot load at all, the local fallback preserves line boundaries and avoids claiming AST-level rewriting.

Minification should reduce transfer size without changing program behavior

Use the savings as a deployment signal, not as proof of equivalence. Keep the source file, test the minified artifact in its real classic-script or module context, and be cautious with top-level mangling, console removal and reflection-sensitive names.

Search by task, tool name, or category. Press Esc to close.
Start typing to find a tool.