Shrink HTML, CSS and JavaScript — strip comments and whitespace to make files smaller and load faster.

Original
Minified
Saved
Your minified code will appear here.

						

About Code Minifier

The Code Minifier shrinks HTML, CSS and JavaScript by stripping comments, insignificant whitespace and line breaks, so the files you ship are smaller and load faster. Paste code straight into the editor or upload a file, pick the language, and minify with one click.

The result pane shows the minified code next to a size comparison — original bytes, minified bytes and the percentage saved — so you can see exactly what the pass earned you. Copy the output to your clipboard or download it as a file ready to deploy.

Minification is conservative: it removes what browsers ignore rather than rewriting your logic, which makes it safe for hand-written code and templates alike. Files are uploaded only when you choose file mode and are processed and cleaned up automatically.

How to use Code Minifier

  1. Choose the language: HTML, CSS or JavaScript.
  2. Paste your source code, or switch to Upload file and drop the file in.
  3. Click Minify and wait a moment.
  4. Review the size savings — original vs minified — then copy or download the result.

Frequently asked questions

Yes, minifying HTML, CSS and JavaScript is free, with no account or usage limits.

No. The minifier removes comments, extra whitespace and line breaks — content browsers ignore — without renaming variables or restructuring logic, so behavior is preserved.

It depends on how much whitespace and commenting the source contains; heavily commented, well-indented files shrink the most. The result panel reports the exact byte counts and percentage saved for your file.

Yes. Switch the input to Upload file and drop in an HTML, CSS or JS file up to the size limit shown. The file is processed on the server and cleaned up automatically afterwards.

No — they stack. Minification permanently removes ignorable characters from the file; gzip or Brotli then compress what is left during transfer. Minified files compress well too, so doing both gives the smallest download.


Popular searches
code minifier minify css minify javascript minify html compress code online js css minifier
Need help?
Found an issue with this tool? Let our team know.
Report an issue

Add this free tool to your own website — copy and paste the code below.