JavaScript Minifier
Minify JavaScript with Terser: remove whitespace and comments, shorten variable names and simplify code — without changing what it does.
This tool runs entirely in your browser.
Loading tool…
How to use the JavaScript Minifier
- 1Paste JavaScript.
- 2Choose whether to shorten variable names.
- 3Click “Minify JavaScript” and copy the output.
What is the JavaScript Minifier?
Terser is the minifier used by most JavaScript build tools. Minification typically reduces file size by 30–60% before gzip.
Frequently asked questions
Is minified code safe to deploy?
Yes — minification preserves behaviour. Keep the original source for editing and debugging.
Is the JavaScript Minifier free and private?
Yes. The JavaScript Minifier is free, needs no account, and runs entirely in your browser. What you type is never sent to a server or stored.
