Uttir

HTML Minifier

Shrink HTML by stripping comments and collapsing whitespace. See byte savings in real time.

HTML Minifier — Minifying HTML removes the comments, indentation, and excess whitespace that make source readable but inflate file size. For production builds, a few percent off every page adds up to faster loads and lower bandwidth costs.

All processing is local. Your HTML never leaves the browser.

What is html minifier?

Minifying HTML removes the comments, indentation, and excess whitespace that make source readable but inflate file size. For production builds, a few percent off every page adds up to faster loads and lower bandwidth costs.

Paste your HTML on the left, get the minified version on the right, and see the byte savings in real time. Toggle the "remove optional tags" option for an extra pass that drops redundant </li>, </p>, and similar closures that the browser will infer anyway.

How to use it

  1. Paste your HTML

    Drop a snippet, a partial, or a full document.

  2. Pick options

    Toggle "remove optional tags" if you want an extra squeeze.

  3. Copy the minified HTML

    Use the Copy button to grab the result.

Examples

Comment stripping

HTML comments are removed entirely.

Result: <!-- hidden --><p>hi</p> → <p>hi</p>

Whitespace collapse

Multiple spaces and newlines between tags become a single space.

Result: <p>hello world</p> → <p>hello world</p>

Frequently asked questions

Related tools