JS Minifier & Beautifier — free online
Sometimes your JavaScript is one giant blob with no spacing, and you can't read a thing. Other times it's the opposite: you want to shrink a file so it loads faster on your site. We added a free tool that handles both — JS Minifier & Beautifier — right in your browser.
What it does
Paste your JavaScript and pick a direction. Minify it to strip out comments and collapse the extra whitespace safely, so the file gets smaller. Or beautify it to give messy, cramped code clean spacing and indentation that's easy to follow.
Nothing leaves your device
The whole thing runs in your browser. Your code is never uploaded to a server and nothing is saved anywhere. When you close the tab, it's gone. That makes it safe to paste work code you'd rather not send around.
How to use it
- Open JS Minifier & Beautifier and paste your JavaScript into the box.
- Choose minify to make it smaller, or beautify to make it readable.
- Copy the result and drop it into your project.
It's free with no limit. There are more small tools on the Apps page.