JavaScript Minifier: The Complete Guide
Compress your JavaScript with Terser — the industry-standard minifier. Whitespace is removed and (optionally) variable names are shortened to produce the smallest working code.
How to use the JavaScript Minifier
- Paste or type your code, text, or data into the input box.
- Adjust options such as indent size, dialect, or flags when the tool offers them.
- The output updates instantly — copy it to your clipboard or download the file.
Features
- Powered by the Terser engine
- Optional name mangling
- Dead-code & whitespace removal
- Copy or download the result
Why use this tool
- Smaller bundles load faster
- Production-grade optimization
- No build tooling required
What is a JavaScript minifier?
A JavaScript minifier rewrites your code to be as small as possible without changing what it does — removing whitespace and comments, and optionally shortening local variable names. This tool uses Terser, the same engine used by major build tools, so the output is production-ready.