JavaScript Minifier
Minify JavaScript locally by removing comments and extra whitespace.
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.