Shrink your JavaScript instantly — strip comments, collapse whitespace.
This is a lightweight minifier — it removes comments and collapses whitespace. For production builds, use a dedicated bundler like esbuild or Terser.
A free online JavaScript minifier that removes single-line and block comments, then collapses all unnecessary whitespace to produce a compact, browser-ready script. Paste any JavaScript snippet and get the minified version in real time — no installs, no build tools needed. Ideal for quick size checks, code sharing, or learning how minification works before integrating a full bundler.
It removes single-line (//) and block (/* */) comments, then collapses sequences of whitespace and newlines into a single space, producing a smaller but functionally equivalent script.
This is a lightweight, regex-based minifier suitable for simple scripts. For production builds with complex code, template literals, or regex literals, use a dedicated tool like esbuild, Terser, or UglifyJS.
No — it only removes whitespace and comments, which have no effect on how JavaScript executes. Variable names and string contents are left completely unchanged.
For typical commented, well-formatted code you can expect 20–50% reduction. Heavily commented files may shrink even more. The stats panel shows exact original and minified byte counts after processing.