HTML Minifier

Remove comments and extra whitespace from HTML.

HTML Minifier

.html · .htm

Paste text or open a file to see the result.

What it does

Removes comments and the spaces and line breaks between tags that a browser ignores. It makes pages and e-mail templates a little smaller and faster to load. You get HTML that displays the same but takes less space.

About the .html format

.HTML file extension
File Type
Hypertext Markup Language File
Developer
W3C / WHATWG
Category
Web Files
MIME
text/html

HTML is a markup language that defines the structure and presentation of content on the World Wide Web. It is one of the core technologies, along with CSS and JavaScript, that helps render web pages in all their glory.

Also works with

HTML Minifier questions

How do I use the HTML Minifier?

Paste the text into the Input box or open a file, set the options, then copy or download the result.

Does renaming a file to .html change its format?

No. The extension only tells programs what to expect, and the content of the file stays the same. To change the format, convert the file. The .html page lists programs and converters for it.