JavaScript Minifier

Minify JS code — remove comments, whitespace, and reduce file size.

Input JavaScript

Minified

How to Use JavaScript Minifier

① Paste your JavaScript code ② Click Minify ③ Copy the compressed result

About JavaScript Minifier

JavaScript Minifier is a free online tool that compresses JavaScript code by removing whitespace, comments, and unnecessary characters. Smaller JavaScript files load faster, execute sooner, and improve your website's overall performance and user experience. The minification process strips all formatting whitespace — line breaks, tabs, indentation, and extra spaces. It removes single-line and multi-line comments, eliminates unnecessary semicolons, and compresses the code into the smallest possible representation while maintaining identical functionality. JavaScript minification is one of the most impactful performance optimizations for web applications. JavaScript is typically the largest and most expensive resource on a web page. Reducing its size directly improves download times, parse times, and Time to Interactive (TTI). This is especially critical for mobile users and users on slower networks. Everything runs entirely in your browser. Your JavaScript code is never uploaded to any server, ensuring complete privacy for your scripts, API integrations, and business logic. There are no file size limits, no usage restrictions, and no account required. Common use cases include preparing scripts for production deployment, optimizing third-party library bundles, reducing inline script sizes in HTML pages, and compressing JavaScript for browser extensions or bookmarklets. The tool displays before-and-after statistics showing file size reduction and compression ratio. You can copy the minified JavaScript to your clipboard or download it as a file. For the reverse operation — making minified JS readable — use the JavaScript Beautifier. To add an extra layer of protection to your code, try the JavaScript Obfuscator which renames variables and adds anti-debugging measures.

Frequently Asked Questions

Will minification break my JavaScript?
No. Minification only removes whitespace and comments. Your code logic remains identical.
How much smaller will my JS file be?
Typically 20-50% smaller depending on the amount of whitespace, comments, and formatting in the original.
Is my code sent to a server?
No. All processing happens locally in your browser. Your code stays private.
Does it rename variables?
No. This minifier only removes whitespace and comments. For variable renaming, use a tool like Terser or UglifyJS.
Share Aether Tool
Help us grow!