How to use the JavaScript Minifier
- 1Paste your JavaScript.
- 2Read the minified output and size saving.
- 3Copy the result.
Supported formats and limits
- Removes // and /* */ comments and collapses safe whitespace.
- Strings, template literals and regex literals are preserved.
- Does not rename variables — for that, use a full bundler like esbuild or Terser.
Common uses
- Shrinking a small script for a static page.
- Cleaning code before embedding it.
- Understanding what minifiers remove.
Frequently asked questions
Is this safe for production?
It is conservative by design, but for production bundles a dedicated tool with full parsing is the right choice. Always keep your original source.
