HTML Minifier

Minify HTML. Remove comments, collapse whitespace.

Result

Related tools

How it works

  1. 1Paste HTML into the input area.
  2. 2Comments are removed, whitespace is collapsed, inline CSS is minified.
  3. 3Copy the minified HTML.

Example

Input: <div>  <p>Hello</p>  <!-- comment --></div>
Output: <div><p>Hello</p></div>