Free tool · runs in your browser

HTML, CSS & JS Minifier

Paste your code, choose the language, and get a smaller file that works exactly the same.

Minifying is one small speed win

Want the whole site faster?

I speed up WordPress, WooCommerce and Shopify sites end to end: caching, images, scripts, fonts and hosting, aiming for green Core Web Vitals.

Speed up my site

What minifying removes

  • CSS: comments, line breaks, indentation and spaces around braces, colons, semicolons and commas. Six-digit colours like #ffffff become #fff.
  • JavaScript: comments and whitespace, plus shorter variable names and simplified code (Terser compress and mangle).
  • HTML: comments and repeated whitespace. Inline <style> is minified too. Content inside <pre>, <textarea> and <script> is left alone.

Frequently asked questions

Is minifying safe?

Yes, when done carefully. This tool only removes comments and spaces that browsers ignore, and keeps the ones that matter (inside calc(), strings, <pre> blocks and text areas). JavaScript is minified with Terser, the same engine most build tools use. Always test the result before replacing a live file.

How much smaller will my files get?

Typically 15 to 30 percent for CSS and HTML, and 40 to 60 percent for JavaScript. Combined with gzip or Brotli compression on your server, pages download noticeably faster.

Does minifying help SEO?

Indirectly. Smaller files load faster, which helps Core Web Vitals and keeps visitors from leaving. Google's PageSpeed Insights flags unminified CSS and JavaScript as an opportunity.

I use WordPress. Do I need this?

Usually not by hand: caching plugins like LiteSpeed Cache, WP Rocket or Autoptimize minify files automatically. This tool is handy for custom code, snippets and checking how much a file can shrink.

More developer & marketing tools