tomai
Log in
Free · Developer Tools

HTML CSS JS Minifier

Shrink HTML, CSS and JavaScript for faster pages

Input
Output

What is an HTML CSS JS minifier?

A minifier removes everything from source code that is not required to run it: comments, extra whitespace, blank lines and redundant punctuation. Smaller files mean faster page loads, lower bandwidth bills and better Core Web Vitals — this is why every serious production site minifies its HTML, CSS and JavaScript before shipping. Doing it safely is harder than it looks: whitespace inside a string literal in JavaScript is significant, a regex contains "/" and "//" that look like comments, and HTML whitespace inside

 must survive. This tool tokenizes each language and removes only what is provably safe.

What it can do

  • Minify HTML, CSS or JavaScript from one tabbed tool
  • Strip comments without touching the string they hide in
  • Collapse whitespace while preserving string, regex and template content
  • Keep
    /