Developer tools
JavaScript Minifier
Minify and compress JavaScript online using Terser. Shorter variable names, no comments, smaller files. Free and private.
How to use the JavaScript Minifier
-
1
Paste your JavaScript.
-
2
Click Minify.
-
3
Copy or download the minified code.
About this tool
Compress JavaScript with Terser, the same minifier used by most modern build tools. Comments and whitespace go, and local names are shortened.
Frequently asked questions
What if my code has a syntax error?
The tool shows the error and line number instead of producing broken output.
Is my code sent anywhere?
No. Terser runs in your browser.