HTML CSS JS Minifier
Shrink HTML, CSS and JavaScript for faster pages
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
/
- Show bytes before → after and the percentage saved
- Copy or download the minified result
When to use it
- Shrinking a JS snippet, CSS block or inline HTML before shipping
- Making a page pass performance budgets with less payload
- Preparing one-line outputs for fields that reject newlines
- Quickly obfuscating the file size of an embedded asset
Privacy: the minification happens entirely in your browser — nothing you paste is ever uploaded.
Safe minification versus risky tricks
- Comments, indentation and line breaks go first — usually a third of raw script size with zero risk.
- Local variable renaming happens only where scope proves it safe; globals and property names stay untouched so external APIs never break.
- Even after gzip, minified source stays meaningfully smaller — the two layers remove different kinds of redundancy.
Where the bytes actually go
Three languages, one tool
HTML, CSS and JS minification share one tabbed page, each with a language-appropriate tokenizer — no hopping between single-purpose sites.
Strings and regexes survive
The tokenizer understands quoted strings, template literals and regex literals, so minification never breaks "a/ b/c" or the comment-looking text inside them.
Measured savings
The status bar reports bytes before and after plus the percentage saved, so you can see exactly how much payload each minify removes.
Frequently asked questions
Is it safe for JavaScript?⌄
Yes. The JS minifier tokenizes the input first, distinguishing comments from regex literals and strings, so "/…/" patterns and "//" text inside strings are preserved byte-for-byte while only true comments and cosmetic whitespace are removed.
What about HTML whitespace?⌄
Whitespace between tags is collapsed, but content inside <pre> and <textarea> is preserved because it can be meaningful, and string attributes are kept as-is. The output remains valid HTML that renders identically.
Does this replace a build pipeline?⌄
For one-off tasks, yes. For a whole project you would still use esbuild/terser/CSSNano in CI, but this tool is ideal for copying a snippet, an email template or a single asset into the smallest form.