JavaScript Minifier
Minify JavaScript for smaller distribution files by compressing expressions, shortening local names, and removing comments.
- Free
- No sign-up
- Runs in your browser
Parse, compress, and mangle JavaScript locally. Keep a readable original and test the output before deployment.
Processing happens in this browser. Your input is not uploaded or saved.
All processing happens in your browser — files never leave your device. Your input stays in this browser and is not uploaded to Smart Online Tools.
How it works
- Paste JavaScript source code.
- Select Minify JavaScript.
- Copy the output and test it in your application.
Good to know: Minification can change behavior in code that depends on function or class names, reflection, or specific build settings. Keep the original source and test the result.
What minification changes
This tool uses Terser to parse JavaScript, compress code, and mangle local identifiers. It does not run the input. The output is intended for a production bundle, while readable source should remain in version control.
Some applications rely on function names, class names, property names, or particular module settings. Test minified output with your own build and source-map workflow before publishing it.
Minifying JavaScript safely
Minification removes whitespace and comments to make scripts smaller. Advanced minifiers also shorten variable names, which is why minified code is hard to read. Always keep the original source for editing and debugging.
Test the minified script before deploying, because code that depends on function names or relies on automatic semicolon insertion in unusual ways can behave differently.