Paste JavaScript code and get a minified version instantly. The tool removes single-line and multi-line comments, collapses whitespace, and shows before/after byte counts.
Features
Comment Removal — Strips // and /* */ comments while preserving string literals.
Whitespace Collapse — Reduces indentation and blank lines to minimal separators.
Stats Display — Original bytes, minified bytes, and savings percentage.
One-Click Copy — Grab the minified output for your build pipeline.
Common Use Cases
Quick Prototyping — Minify small scripts without setting up a build tool.
Performance Checks — See how much a JS file can be compressed.
Inline Scripts — Compress JavaScript for inline tags.
Why Use This Tool
While production builds should use proper bundlers like esbuild or Terser, this tool is perfect for quick checks, one-off scripts, and understanding how whitespace and comments affect file size.