JavaScript Minifier
Make your JavaScript files smaller so your website loads faster. Paste your code and get a compressed .min.js version with the size saved.
How to use the JavaScript Minifier
- Paste your JavaScript code.
- Choose whether to shorten names and compress, then press Minify.
- Copy the minified code or download it as a .min.js file.
Uses the open-source Terser minifier, downloaded once (about 250 KB) and run in a background worker. JSX/TypeScript are not supported.
Frequently asked questions
Is minified code safe to use?
Yes. It behaves exactly like the original; it just has shorter names and no extra spaces or comments. Always keep your original file for editing.
What does “mangle” mean?
It renames local variables and functions to short names like a or b. Global names and object properties are not renamed, so your page still works.
Does it support modern JavaScript?
Yes, including ES2015+ features such as arrow functions, classes, let/const, async/await and template strings.
What is the gzip size?
Most web servers send files gzip-compressed. The gzip number estimates what visitors will actually download.