Input
Minified Output

What is Minification?

Minification removes unnecessary characters from code, such as comments and whitespace, to reduce file size. Smaller files can load faster and are easier to paste into compact examples.

This tool is intentionally lightweight and best for quick snippets. For production bundles, use a build tool such as esbuild, Terser, Lightning CSS, Vite, or your framework's optimizer.

Will it optimize all JavaScript safely?

No. It handles common strings, comments, and regex literals, but it is not a full parser. Use a production minifier for application code.