JavaScript Minifier
Minify JavaScript with a real Terser engine to reduce bundle size.
Minify JavaScript in your browser with Terser
The JavaScript Minifier compresses your code by removing whitespace, comments, and unnecessary characters, and by shortening local variable names. It runs a real Terser engine — the same battle-tested minifier behind many modern build tools — so the output is production-grade rather than a naive regex trim. Smaller files mean faster downloads, quicker parse times, and leaner bundles shipped to the browser.
How it works
Everything runs locally in your browser via JavaScript. When you paste code and click minify, Terser parses it into an abstract syntax tree, applies compression and name-mangling passes, then prints the smallest safe equivalent. Your source never leaves your machine — there is no server round-trip, so even large scripts stay completely private and load instantly on repeat visits.
When to use it
- Shrink a standalone script or snippet before shipping it to production.
- Check how much a file compresses without wiring up a full build pipeline.
- Minify inline code for embeds, bookmarklets, or userscripts.
- Compare readable and minified sizes to justify an optimization.
Pair it with the CSS Minifier and HTML Minifier to compress an entire front end. Need to go the other way and make minified code readable again? Use the JavaScript Formatter to pretty-print and re-indent it.
Private by design
Because processing happens entirely in-browser, no data is uploaded and nothing is stored. The tool is free, requires no account, and works on all modern browsers including phones and tablets. Close the tab and nothing remains — no logs, no history, no trace of your code anywhere.
Frequently asked questions
No. All minification runs locally in your browser with Terser, so your source never leaves your device and nothing is stored on any server.
Related tools
SQL Formatter
Format and beautify SQL queries across MySQL, Postgres and more dialects.
XML Formatter
Pretty-print and indent XML, or collapse it back into one line.
HTML Beautifier
Format and indent messy HTML into clean, readable markup.
CSS Beautifier
Beautify and indent CSS with consistent spacing and formatting.