loot.tools

JS Minifier / Beautifier

Paste JavaScript code and minify it by stripping comments and collapsing whitespace, or beautify it with clean indentation. See the size savings instantly.
0 chars
0 chars

What minification does

Minifying removes everything that doesn't affect how your code runs: comments, extra whitespace, and line breaks. The result is a single dense block of code that's smaller to download. Most production websites serve minified JavaScript to cut load times. This tool shows you exactly how many bytes you're saving.

What beautifying does

Beautifying (or prettifying) is the opposite of minifying. It adds consistent indentation, line breaks, and spacing so the code is easy to read. Useful when you're debugging minified production code or reviewing someone else's compressed bundle. Pick 2 or 4 spaces for indentation and get cleanly formatted output.

When to use each

Minify before deploying to production. Every kilobyte saved means faster page loads, especially on mobile connections. Beautify when you need to read, edit, or debug code that's been compressed. If you've pulled a minified script from a CDN or need to inspect a bundled file, paste it here to make it readable again.

© 2026 loot.toolsYour data stays in your browser.