Developer

HTML Minifier

Paste HTML to remove comments and collapse the whitespace between tags for a smaller page payload.

Developer

HTML minifier

Local only
Everything stays in your browser

Your text is processed on your device — nothing is uploaded to a server.

How much does minifying save?

Savings depend on how the source was written. Heavily indented templates with comments often shrink by 20% or more; already-compact markup barely changes.

What is removed

HTML comments (except conditional comments) and runs of whitespace between tags. Text content itself is left intact apart from collapsed spaces.

Good to know

Frequently asked questions

Is it safe for production?

For typical markup, yes. Always check the output if your CSS depends on whitespace between inline elements.

Are conditional comments kept?

Yes, comments beginning with [if are preserved.

Is my HTML uploaded?

No. Minification happens on your device.

Can I reverse it?

Use the HTML Formatter to re-indent the minified markup.