JavaScript Minifier
Runs in your browser — your data is never uploaded.
Shrink a JavaScript file using Terser, the same production-grade minifier used by major bundlers — mangling variable names, removing dead code and stripping whitespace and comments. Runs entirely in your browser, so proprietary source never leaves your device.
0 characters · runs entirely in your browser
How to use JavaScript Minifier
- 1
Paste your JavaScript into the box.
- 2
Click “Minify”.
- 3
Copy the result, or download it as a .js file.
Share
Embed this tool on your site
Paste this where you want the tool to appear. It runs entirely in your visitor's browser — no uploads, no account, no tracking.
Please keep the attribution line — it's what keeps these tools free.
Need a different size, a dark theme, or a different tool? Build an embed lets you preview it first.
Frequently asked questions
What minifier does this use?+
Terser, a real, actively maintained JavaScript parser and minifier — the same tool behind minification in many production build pipelines — running entirely client-side via its pure-JS build.
Will minifying break my code?+
Terser parses your code into a proper syntax tree before transforming it, so valid JavaScript minifies safely. Code with a genuine syntax error will fail to minify and shows a friendly error instead of silently producing broken output.
Is my code uploaded anywhere?+
No. Minification runs entirely in your browser — nothing is sent to a server, which matters for unreleased or proprietary code.