Minify mode

Removes comments and whitespace, strips spaces around braces, colons, and semicolons, and drops the optional final semicolon. Content inside url() is preserved.

0 B · 0 chars
0 B · 0 chars

Questions

Frequently asked questions

What does minification do?

Minification removes characters that aren't required for execution — comments, line breaks, indentation, and redundant whitespace — without changing what the code does. The result is byte-for-byte smaller and faster to download.

Is minified CSS or HTML still valid?

Yes. The tool only strips whitespace, comments, and optional trailing semicolons in CSS. Selectors, property values, attribute values, and tag content are preserved exactly. Both browsers and validators accept the output as-is.

What does the HTML minifier protect?

It preserves content inside <pre>, <textarea>, <script>, and <style> tags verbatim — whitespace matters there. It also keeps IE conditional comments (the <!--[if IE]>…<![endif]--> blocks) untouched.

Will the output ever be larger than the input?

No. The minifier guarantees the output byte length is always less than or equal to the input. If a transformation would somehow grow the source (it shouldn't with normal input), the tool falls back to the original.

Is my code sent to a server?

No. Everything runs locally in your browser using plain JavaScript string processing. Your CSS or HTML never leaves your device.