Skip to content
📦

JavaScript Minifier

Minify JavaScript by stripping whitespace and comments. View size savings. Safe-mode that preserves variable names. Runs in your browser.

Paste JavaScript above to minify.
Safe whitespace minification only — variables are not renamed.

Why minify JavaScript?

Minification removes comments, whitespace, and unnecessary punctuation from JS, typically saving 30–60% before gzip. This tool performs safe whitespace minification — it does not rename variables (no mangling), so output remains readable for debugging. For aggressive optimization (mangle, dead-code elimination), use a build-time tool like Terser or esbuild.

What this tool does not do

This tool performs only safe whitespace minification. For mangling, dead-code elimination, and tree shaking, use a real build tool such as Terser or esbuild.

Privacy

All processing runs 100% in your browser. No data is sent to any server.