Real Minification
More than stripping spaces. It rewrites your code safely, handling strings, regular expressions, and template literals without breaking them.
Minify JavaScript online to shrink file size and speed up your site. Paste your code or upload a .js file, pick a level, then copy or download the minified result. Free, no signup, nothing uploaded.
Paste your JavaScript into the box, or switch to the upload tab and drop in a .js file.
Choose Light to strip comments and spacing, Standard to also shorten code, or Maximum to also rename variables for the smallest output.
The minified code appears below with the size saved. Copy it or download a .min.js file.
Minifying JavaScript removes everything a browser does not need to run your code. Comments, line breaks, and extra spaces all go, and the result is a single compact file that downloads and parses faster. On a busy page with several scripts, those saved bytes add up to a quicker load and a better experience for your visitors.
This tool does real minification, not a simple find and replace. It reads your code the way a browser does, so strings, regular expressions, and template literals stay intact. Standard mode shortens the code itself, and Maximum mode also renames local variables to single letters for the smallest output, while keeping the behavior exactly the same.
Paste your code or upload a file, pick a level, and watch the size drop. You see the before and after sizes and the percentage saved, then copy the result or download a min.js file. Everything runs in your browser, so your code never leaves your device.
More than stripping spaces. It rewrites your code safely, handling strings, regular expressions, and template literals without breaking them.
Light keeps things readable, Standard shortens the code, and Maximum renames local variables for the smallest possible file.
Every run shows the original size, the new size, and the exact percentage you saved.
Paste code straight in or drop a .js file. The file is read on your device, never sent anywhere.
Copy the result with one click or download a ready .min.js file for your project.
All processing happens in your browser. Your code is never uploaded, logged, or stored.
More Developer tools you might find useful.
Common questions about minifying JavaScript.