🗜️

HTML Minifier

Compress HTML by stripping comments and whitespace, with a clear size-savings report.

Frequently Asked Questions

What does the minifier remove?

HTML comments, whitespace between tags, redundant spaces around attributes, and (optionally) the quotes around attribute values that do not need them.

Is the content of script, style, pre and textarea protected?

Whitespace inside those elements is preserved so code and preformatted text are not broken. Comments inside scripts are left untouched.

How much smaller will my HTML get?

Typical savings are 10–30% on hand-written pages. The tool shows exact before/after byte counts and the percentage saved.

Should I minify HTML in production?

Yes — smaller HTML downloads and parses faster. Keep a readable source copy and minify as part of your build or deploy step.

Related Tools