← Back to Converters

HTML Minifier

Remove whitespace and comments from HTML

About the HTML Minifier

The HTML Minifier strips unnecessary whitespace and, optionally, comments from your markup to reduce file size before deployment. Smaller HTML files load faster and use less bandwidth, which is a quick, free win for page speed.

How to Minify HTML

  1. Paste your HTML into the input box.
  2. Choose whether to remove comments.
  3. Click Minify HTML.
  4. Copy the minified output and check the byte savings.

Key Features

  • Removes unnecessary whitespace
  • Optional comment stripping
  • Shows before/after size and savings
  • Fast, browser-based processing

FAQ

Will minifying break my HTML?

No, only whitespace and, optionally, comments are removed — the structure and content stay intact.

How much can I reduce file size?

Savings depend on how much whitespace and how many comments your original file has — the stats panel shows the exact result.

Can I keep the comments in?

Yes, uncheck Remove comments before minifying.

Is my code uploaded anywhere?

No, minification happens entirely in your browser.