Explosion Tools

JavaScript Minifier Online

Minify JavaScript to reduce file size for production. Free, no signup, works in your browser.

Minified output will appear here…

All minification happens in your browser. No data is sent to any server.

About JavaScript Minifier

This JavaScript minifier removes comments, whitespace, and newlines from your code to reduce file size for production. It correctly handles single-line (//) and multi-line (/* */) comments, preserves string literals and template literals, and collapses whitespace while maintaining necessary spaces between identifiers. The size savings are displayed in real time. Note: this is a whitespace/comment minifier — for variable renaming and dead code elimination, use a build tool like Terser or esbuild.

Frequently Asked Questions

How much does JavaScript minification save?
Comment and whitespace removal typically saves 30-50% depending on how well-commented your code is. The tool shows exact before/after sizes.
Does this minifier rename variables?
No. This tool only removes comments and whitespace. For advanced minification with variable renaming and dead code elimination, use a build tool like Terser, esbuild, or SWC.
Will minification break my code?
No. Removing comments and whitespace does not change how JavaScript executes. String literals, template literals, and regex patterns are preserved exactly as-is.

Related Tools