CSS & JS Minifier

Minify or beautify CSS and JavaScript right in your browser. See exactly how many bytes you save — nothing is uploaded anywhere.

Input JavaScript

Output

Original: 129 B Output: 97 B Saved: 25%

Safe by design

  • Strings, template literals, and regex literals are protected exactly.
  • Newlines that matter for JavaScript ASI are preserved.
  • CSS colors and zero units are compacted without changing values.

Why it matters

Every byte you shave improves Time to Interactive and Core Web Vitals. Pair minified assets with compression for the biggest wins on slow connections.

Frequently asked questions

Does minification change behavior?

No. This tool is string-aware and preserves the line breaks JavaScript needs for automatic semicolon insertion. Test your minified file once in a real browser before shipping to be safe.

Is this a full compiler?

No — it is a fast, client-side whitespace, comment, and micro-optimization minifier. For aggressive transformation (renaming variables, dead-code elimination) use a build tool like esbuild during development.

Can I use the output in production?

Yes. Download the file and serve it with correct MIME types. Combine with gzip or Brotli compression on your web server for maximum savings.

More from Developer Tools

Browse all 100 tools →

Build custom software with us

From internal tools to full platforms — we deliver end to end.

Was this tool useful?