JavaScript Minifier
Minify JavaScript with Terser — removes whitespace and comments, shortens variable names and drops dead code to cut file size.
How to use
- 1Paste your JavaScript (ES2020+ is supported).
- 2Choose the options and copy the minified code.
Frequently asked questions
Is minified JavaScript safe to use?
Yes. Terser is the minifier used by webpack, Vite and Next.js. Behavior is preserved as long as your code doesn't rely on function names or Function.toString().
What does 'Mangle names' do?
It renames local variables and parameters to short names like a, b, c. Global and exported names are never renamed.
Is this the same as obfuscation?
Minified code is harder to read but not protected — tools can reformat it. Never put secrets in client-side JavaScript.