Free Online JavaScript Minifier

Reduce your JS file size by up to 70%. AST-level minification runs entirely in your browser — no server upload, no data leaves your machine.

Presets:

Input — JavaScript

Minified Output

// Output appears here
0 B
Original Size
0 B
Minified Size
0%
Savings
0
Tokens Saved

Why Use Our JavaScript Minifier?

🔒 100% Client-Side

Your code never leaves the browser. All parsing, transformation, and minification happen locally using a built-in AST engine — zero server roundtrips, zero data risk.

⚡ AST-Level Minification

Goes beyond regex hacks. We parse your code into an abstract syntax tree, apply real transformations — dead code elimination, variable mangling, string collapsing — then regenerate optimal output.

🎯 Configurable Transforms

Pick exactly which optimizations to apply. Strip console.log and debugger in production, mangle local variables for maximum compression, or keep your code readable during development.

📦 Instant Download

Copy to clipboard or download as .min.js with one click. Preset examples let you test transforms instantly — jQuery plugins, React components, or utility functions.

Frequently Asked Questions

Is my code sent to any server?
No. This tool runs entirely in your browser. The JavaScript parser and minifier are loaded as part of the page — no code is ever transmitted to any server, API, or third-party service. Your intellectual property stays on your machine.
What minification techniques are applied?
The minifier performs comment removal, whitespace elimination, safe semicolon removal, string concatenation collapsing ("a"+"b" → "ab"), console.log/debugger stripping, and simple variable name mangling that renames local variables to short identifiers while preserving semantics.
Can I use this for production code?
This tool is great for quick minification and testing. For production builds, we recommend pairing it with tools like Terser, esbuild, or Rollup in your CI pipeline. Use this playground for prototyping, comparing sizes, or one-off minification when you don't have a build tool handy.

Get Minification Tips in Your Inbox

Weekly front-end performance tips, new transform features, and JS size optimization tricks.