HTML / CSS / JS Minifier

Shrink HTML, CSS or JavaScript by removing comments and extra whitespace. Your code is never run.

How it works

CSS: comments and whitespace are removed while strings and calc() spacing are kept. HTML: comments and whitespace between tags are removed; pre, textarea, script and style blocks are untouched. JavaScript: comments and blank lines are removed but line breaks are kept, which is safe but less compact than a full build tool such as Terser.

Always test minified code before using it on a live site.

Frequently asked questions

Is this as small as webpack or Terser?

No. It is a safe quick clean-up. Use a build tool for maximum compression.