What does a JS/CSS minifier do?
A minifier rewrites your JavaScript or CSS into the smallest equivalent form your browser will still understand. It strips comments, whitespace, and redundant tokens, then shortens variable names (in the case of JS) and merges adjacent selectors (CSS). The result is a smaller payload, faster page loads, and lower bandwidth bills — without changing what the code does.
What this tool does
- JavaScript — powered by Terser, the de facto standard minifier used by Webpack, Rollup, and friends.
- CSS — powered by CSSO, which deduplicates rules and merges shorthand.
- Size report — shows the byte count before and after, plus the savings percentage.
- Local execution — both minifiers run entirely in the browser; nothing is uploaded.
Tips
- For production, use a build tool — but this is perfect for quick one-off scripts or pasted snippets.
- Modules with top-level declarations are handled fine; just paste valid syntax.
- If you're shipping minified CSS, also consider Gzip or Brotli on the server — they stack with minification.
The minifier libraries are loaded on demand the first time you click Minify, so the initial page stays lean.