HTML Minifier

Shrink HTML by removing comments and extra whitespace.

How it works

Paste HTML and get a smaller version with comments and extra whitespace removed. Tick Keep comments if you want to keep them.

Worked example

A page with indented tags and comments shrinks to one tight line.

Good to know

Common questions

Is it safe?
Spaces between inline tags can matter, so check the page after minifying.
How much will it save?
It depends on how much whitespace and how many comments you have.
Does it shrink CSS and JS?
This tool removes comments and extra whitespace in the HTML. Use a dedicated minifier for CSS and JS.

More in Developer.