JavaScript Minifier
Compress JavaScript safely with an AST-based minifier.
Input JavaScript
Options
ECMAScript target
Source map
Output
A source map comment was appended to the output.
How to use the JS minifier
- Paste or upload your JavaScript, then press Minify (or Ctrl+Enter).
- Choose an ECMAScript target that matches your audience — the output stays compatible with it.
- Toggle Compress and Rename local variables off if you need readable output.
- Enable Source map to debug the minified bundle back to your original files.
- Verify the result in the JavaScript sandbox before deploying.
Frequently asked questions
Is it safe to minify React, Vue or Angular code?
Yes. The minifier is built on Terser, which parses JavaScript into an AST before rewriting it. It understands modern syntax (JSX is not part of JavaScript itself, but standard component code, hooks and ES modules are handled correctly). For JSX files use Babel output first.
Does minification change the behaviour of my code?
No. Minification only removes things with no runtime effect (comments, whitespace, optional tokens) and renames private identifiers. Public API names are preserved so external callers and source maps keep working.
Can I minify ES modules or async/await code?
Yes. The parser supports ES5, ES6+, modules, classes, arrow functions, async/await, optional chaining and nullish coalescing out of the box.