JavaScript Minifier
runs in your browserno sign-upfree
Compress JavaScript with Terser to reduce file size and improve website performance.
Minifying…
Input458 chars
Output
About this tool
This JavaScript minifier uses Terser — the minifier behind most modern build tools — to remove whitespace and comments, shorten variable names and apply safe optimisations. Smaller scripts download and parse faster, improving your site’s performance.
How to use
- Paste your JavaScript into the Input box.
- Choose whether to shorten names (mangle), apply optimisations (compress) and keep licence comments.
- Copy the minified code or download it as a .min.js file.
FAQ
What do mangle and compress mean?
Mangle renames local variables and functions to short names like a and b. Compress rewrites code into shorter equivalent forms and removes unreachable code. Both are safe for normal scripts.
Can I minify modern JavaScript?
Yes. Terser supports modern syntax such as arrow functions, classes, async/await and modules.
Is my code uploaded?
No. Minification runs in your browser, and your code never leaves your device.