HTML, CSS & JS minifier.

Make HTML, CSS and JavaScript files smaller by stripping comments and whitespace. It is deliberately conservative: it never renames variables or rewrites logic.

Runs in your browser. Nothing you enter is sent to KRA Digital or anyone else.

More performance tools · All 55 free tools

How to use it

  1. Choose the language and paste your code.
  2. Press Minify. Comments and unnecessary whitespace are removed; strings, regular expressions and template literals are left untouched.
  3. Check the size saving, copy or download the result.
  4. Test the minified file before you deploy it, and keep the original source for editing.

Questions

How is this different from a build tool minifier?

Tools such as Terser, esbuild or cssnano also rename variables and rewrite code for bigger savings. This tool only removes comments and whitespace, which is safer for quick jobs but saves less.

Are licence comments kept?

Yes. Comments that start with /*! are preserved, which is the usual convention for licence notices.

Does minifying replace compression?

No. Serve text files with Brotli or gzip as well; the two work together.

Is the HTML output safe?

Whitespace inside pre and textarea elements is preserved. Spaces between inline elements are collapsed to a single space rather than removed, so text does not run together.

Let’s build something great.

Tell us what you want to build, who it is for and what it needs to do. We’ll help you define a practical next step.

Start a project