HTML / CSS / JS Minifier
Minify HTML, CSS, or JavaScript to shrink file size — using proper minifiers, with a bytes-saved readout and copy/download.
Free HTML, CSS & JavaScript Minifier
Need to shrink your code? Our free HTML minifier — plus CSS and JavaScript — strips out comments and unnecessary whitespace to make your files smaller and faster to load. Paste your code, pick the language, and get clean minified output instantly, along with a clear readout of exactly how many bytes and what percentage you've saved.
It uses proper minifiers under the hood, so your code is compressed correctly without breaking strings, comments inside strings, or important licence banners. Switch between HTML, CSS, and JavaScript, copy the result, or download it as a file ready to drop into production. If your code has a syntax error, you'll get a clear message instead of broken output. And because everything runs in your browser, your source — even proprietary code — never leaves your device.
Simply paste your code to minify it instantly. No sign-up, no downloads, no limits — just smaller files, privately.
About the Minifier
Features
Auto-detect language
Paste any HTML, CSS, or JavaScript and it's identified automatically, or pick manually.
Size readout
See the original size, minified size, and percentage saved for every input.
Safe defaults
JavaScript variable mangling is off by default, kept readable-ish; a toggle turns it on for maximum compression.
Licence comments preserved
Comments starting with /*! survive minification across all three languages.
Copy and download
Copy the minified result or download it as a ready-to-use file.
Fully client-side
Your source code, even proprietary code, never leaves your browser.
Why minify
Minification strips out whitespace, comments, and other characters that browsers don't need to execute your code, shrinking file size without changing behaviour. Smaller HTML, CSS, and JavaScript files download and parse faster, which directly improves page load performance and Core Web Vitals.
Related Calculators & Tools
Encode and decode URLs and query parameters online, with component and full-URL modes and full Unicode support — all in your browser.
Test and debug regular expressions live — highlight matches, inspect capture and named groups, and try replacements, all in your browser.
Convert Unix timestamps to human-readable dates and back, in seconds or milliseconds, UTC or local time — with a live current-timestamp readout.
Parse cron expressions online — get a plain-English description and the next 10 run times.
Authoritative Sources & Standards
- MDN Web Docs — Web APIs, Encoding & Data Formats Specification — Mozilla Developer Network (MDN)
- IETF RFC Standards Index (RFC 3986 URI, RFC 4648 Base64, RFC 7519 JWT, RFC 8259 JSON, RFC 9562 UUID) — Internet Engineering Task Force (IETF)
Frequently Asked Questions
How does the minifier work?
Paste your code and choose the language; it removes comments and unnecessary whitespace to produce a smaller, minified version, and shows how much you saved.
Which languages does it support?
HTML, CSS, and JavaScript, with a selector and an auto-detect option.
Will minifying break my code?
No. It uses proper minifiers that understand the language, so strings, template literals, and comments inside strings are preserved. Valid code stays valid.
What is minification?
Removing characters that aren't needed to run the code — whitespace, line breaks, and comments — to reduce file size and speed up loading, without changing behaviour.
How much can I save?
It varies by code, but the tool shows the exact bytes and percentage saved for your input.
Are important comments kept?
Licence-style comments (like /*! ... */) are preserved where the language's minifier supports it.
What if my code has an error?
You'll get a clear message and your input is left intact, rather than getting broken minified output.