HTML Minifier

Minify HTML markup for faster-loading, lighter pages.

Your minified HTML will appear here.

How to use this tool

  1. Paste your HTML markup.
  2. Click Minify HTML to remove comments and collapse whitespace between tags.
  3. Copy the compressed markup for production use.

Frequently asked questions

Will this remove important whitespace, like inside <pre> tags?

This tool uses simple whitespace collapsing best suited for typical markup. For content-heavy pages with <pre> or <textarea> blocks, review the output before publishing.

Keep Going

Related tools