JavaScript Minifier - Minify JavaScript Online
Minify JavaScript online with Terser. Paste code or choose a .js file, then copy or download a separate minified file. Your code stays in your browser.
- Free
- Runs in your browser
- No code upload
Only UTF-8 source files are supported. Downloads use UTF-8.
Ready. No code leaves your browser.
Minified JavaScript
The original input is not changed. Review and test the output before publishing.
How to minify JavaScript online
Add your code
Paste source text or select a .js file. The file is read locally.
Minify and inspect
Click Minify JavaScript. Check any syntax error or inspect the generated code.
Copy or download
Copy the output or save it as a separate .js file.
Paste JavaScript or choose a .js file. Click Minify JavaScript, inspect the output, then copy it or save script.min.js.
When to use this JavaScript minifier
Use it to prepare a smaller text asset for a static website, inspect the difference between source and compact code, or create a separate release copy without editing the original.
Limitations
This conservative mode removes whitespace and ordinary comments but does not compress expressions or rename identifiers. It preserves /*! license comments and some recognized license notices, but review license retention for your own project. Terser parses conventional scripts, not all proposed syntax or JSX/TypeScript. Input must be valid JavaScript; minifying does not test runtime behavior. Large files may briefly occupy the browser main thread. Only UTF-8 source files are supported; downloads are UTF-8.
JavaScript Minifier FAQ
Is my code uploaded?
No. Selected files and pasted code are processed locally in your browser. Loading the page itself still makes ordinary website requests.
Does it change variable names?
No. Identifier mangling and expression compression are disabled. Review the output and run your own tests before using it in production.
Can I save the original file?
Your original remains untouched; download creates a separate .js copy. Rename it as needed.