JavaScript Minifier
Minify JavaScript locally by removing comments and extra whitespace.
Embed this tool
Copy the iframe code below to add this tool to your site. The embed loads JavaScript Minifier without ads.
Embed code copied to clipboard.
Tool workspace
Minify JavaScript in your browser by removing comments and extra whitespace. Strings and template literals are preserved. Code is not executed or uploaded. Not a bundler-equivalent build step.
How it works
Minification runs entirely in your browser: line/block comments and unnecessary whitespace are removed while quoted strings and template literals stay intact. Code is never executed, evaluated, or uploaded.
Empty input clears the result—no error. This is not a full JavaScript parser or a production bundler (terser/esbuild/uglify) equivalent.
Examples
- // note → removed; const x = 1; → const x=1;
- Preserve " spaces " and `template ${literals}`
- Status shows before → after character counts when useful
Privacy
FAQ
Is my JavaScript uploaded?
No. Minification runs entirely in your browser. We do not log or store what you paste.
Will this match my bundler’s minifier?
Not necessarily. This is a safe best-effort minifier for pasted source, not a production build pipeline.
Do I need an account?
No. All published tools work for guests without login.