Compress JavaScript to reduce bundle size, or beautify minified code for debugging. 100% in-browser — your code never leaves your device.
Your JavaScript code never leaves your browser. All processing runs locally with no server uploads.
Real-time processing as you type. No waiting, no API calls, no size limits.
Compress for production or unminify third-party code for debugging. Both in one tool.
| Tool | Use Case | Variable Mangling | Dead Code |
|---|---|---|---|
| This tool | Quick online preview | No | No |
| esbuild | Build pipeline (fastest) | Yes | Tree-shaking |
| Terser | Best compression ratio | Yes | Yes |
| SWC | Rust-based, very fast | Yes | Yes |
Whitespace and comment removal typically reduces JS by 20-40%. Advanced minifiers like Terser that also mangle variable names can achieve 60-80% reduction. With gzip compression on top, production JS bundles can be 5-10x smaller than the original source.
Conservative minification (whitespace and comment removal) never breaks code. Aggressive minification with variable renaming can break code that uses Function.name, dynamic property access, or eval. Always test minified output before deploying to production.
Minification removes whitespace and comments. Uglification (mangling) additionally renames variables to shorter names (userName → a). Uglification provides better compression but makes debugging harder without source maps. UglifyJS popularized the term; modern tools like Terser do both.
Only in production. Development builds should be unminified with source maps for easy debugging. All major bundlers (Vite, Webpack, Parcel, Rollup) automatically minify in NODE_ENV=production. Use this tool when you need a quick one-off minification or want to check how much a file can be compressed.