JavaScript Minifier
Minify JavaScript with terser. Mangle, compress, comment policies — and a before / after size comparison.
Size:
Size: · saved %
Working…
How to use
- 1 Paste your JavaScript on the left.
- 2 Toggle Mangle / Compress and pick a comment policy.
- 3 Click Minify — see before / after size at a glance.
Why use this tool
- Real terser engine — same minifier used by webpack, Rollup, and Vite.
- Lazy-loaded — terser is fetched only when you click Minify, keeping the page light.
- Side-by-side size comparison so you can see exactly what you saved.
- Pure client-side — your source never leaves the browser.
Frequently asked questions
What is the difference vs obfuscation?
Minifying shortens names and compresses syntax for performance. Obfuscation goes further — flattens control flow, encodes strings, injects dead code. See the <a class="underline" href="/js-obfuscator">JS Obfuscator</a>.
Will it run on modern JS?
Yes — terser supports ES2020+ syntax including optional chaining, BigInt, top-level await.
Need to pretty-print it back?
Use the <a class="underline" href="/javascript-formatter">JavaScript Formatter</a> to reverse the layout (not the mangling).
JavaScript Minifier is a free developer utility by Zerethon Tools. Minify JavaScript with terser. Mangle, compress, comment policies — and a before / after size comparison. Runs entirely in the browser — no signup, no upload.
- Category
- Developer
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
Privacy
Your data never leaves your browser unless explicitly stated. JavaScript Minifier runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Open toolSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Open toolUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Open toolPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.