🗜️HTML / CSS / JS Minifier

Minify HTML, CSS, or JavaScript to shrink file size — using proper minifiers, with a bytes-saved readout and copy/download.

Input
Output

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.

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.

Is it free?

Completely free, no sign-up, downloads, or limits.

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.

Is my code sent anywhere?

No. Everything runs locally in your browser, so your source never leaves your device.

Does it work on mobile?

Yes, fully responsive; the input, output, and options fit the screen without overflow.