JavaScript Minifier
Minify JavaScript by removing comments, whitespace, and unnecessary characters.
Key Features
- Minifies JavaScript by removing whitespace, comments, and unnecessary semicolons.
- Shortens variable and function names using identifier mangling for maximum compression.
- Beautifies and re-formats compressed or minified JavaScript back into readable code.
- Displays before and after file sizes and the compression ratio achieved.
- Runs entirely in the browser — your JavaScript source code is never sent to a server.
- Preserves sourcemap comments when present so debugging tools remain functional.
Frequently Asked Questions
Will minification break my JavaScript?
Basic whitespace and comment removal is always safe. Variable mangling is safe for most code but can break scripts that rely on function.name or use eval. Use the conservative mode if you are unsure.
What is the difference between minification and obfuscation?
Minification reduces file size by removing unnecessary characters. Obfuscation deliberately makes code hard to understand by renaming identifiers to meaningless strings. This tool does both to varying degrees.
Is my JavaScript source code uploaded anywhere?
No. Minification runs entirely in your browser. Your code never leaves your device and is not stored on any server.