Minify JavaScript to reduce file size by up to 70%. Or beautify minified code for readability. Supports ES6+.
This tool uses fast pattern-based minification. It works well for standard JS. For complex code with regex literals containing spaces, template strings, or eval(), use a dedicated minifier like Terser for production. Always test the output.
Yes, completely free with no signup required.
Everything runs in your browser. No data is sent to any server.
Paste your JavaScript code into the input box and click Minify. The tool removes comments, whitespace, and newlines to produce compact code. Click Copy to copy the result.
Minify JavaScript before deploying to production websites to reduce page load time. Minified JS loads faster for users worldwide. Use source maps in your build process to keep debugging easy.
Minify JavaScript code by removing whitespace, comments, and shortening variable names — reducing file size by 20–70%. Smaller JS files load faster, improving Core Web Vitals and SEO rankings. Supports ES6+ including arrow functions, template literals, and modules.
Minification runs client-side using Terser.js. Your proprietary JavaScript code is never uploaded to any server.
Paste your raw JavaScript code.
Click Minify to compress the code.
See original vs minified file sizes.
Use the minified code in your project.
Typically 20–70%. Code with many comments and long variable names compresses the most.
Yes — Terser supports modern JavaScript features.
Yes — minification preserves all functionality; only non-essential whitespace/comments are removed.
Minify the compiled JavaScript output, not TypeScript source.
Minification reduces size. Obfuscation also renames variables to make code hard to read — for security, use obfuscation.