Minify JavaScript
Minify JavaScript code
How to use
- Paste your JavaScript into the box.
- Whitespace and comments are stripped to shrink the code.
- Copy the minified JS for production.
Why use this tool
- Smaller bundles: Removes whitespace and comments to reduce file size.
- Faster loads: Less code to download means quicker page loads.
- 100% private: Everything runs in your browser. Your data is never uploaded to a server, so it's safe for confidential content.
Frequently asked questions
Will minifying break my code?
Removing whitespace and comments is safe. For maximum compression with renaming, use a full build tool; this is a quick, safe minifier.
Is this the same as obfuscation?
No. Minifying shrinks code while keeping it functional; obfuscation deliberately makes it hard to read, which is a different goal.
Is my code private?
Yes. It's minified entirely in your browser.
Back to all tools