JavaScript Minifier
Make JavaScript smaller with controls for compression, variable names, and comments. Download the code and an optional source map.
How do I make JavaScript smaller?
Paste JavaScript, choose Script or ES module, and select Minify JavaScript. Compression simplifies expressions and mangling shortens local variable names. Review and download the result. Your code is parsed locally and never run.
Your result
A little clarity, right here.
Start with your own content or load the example. Your result will appear here.
Three simple steps
How to use JavaScript Minifier
Paste your source or open a text file. Try the example if you are learning.
Choose the options and run the tool. Your source stays on this device.
Review the result, then copy it or download the files.
Common questions
Good to know
Understand the result.
Keep the original.
Is this tool free, and are my files uploaded?
This tool is free with no account required. The work happens in your browser. Your input and files are not sent to a processing server.
What are the limits and details?
Up to 100,000 UTF-8 bytes, 5,000 CSS statements and 40 nesting levels. Processing stops after 30 seconds. Files stay on your device. CSS is never applied to this page and JavaScript is never executed. Uses Terser. TypeScript and JSX must be compiled first. Minification is not transpilation. Module mode may remove unused top-level code. Property names are not mangled. Source maps may contain your original source, depending on the chosen option. Gzip figures describe file compression, not network speed.
100 KB of source. Local processing. Cancel at any time.