Markdown & HTML Tools

HTML Minifier

Remove unnecessary whitespace, HTML comments, and redundant attributes from HTML markup. See exactly how many bytes are saved and the percentage reduction before copying the minified output.

Removes comments & whitespace Browser-only See bytes saved
HTML source

All conversion happens in your browser; your text is never sent to a server

Features

  • Removes whitespace between tags
  • Strips HTML comments
  • Removes optional closing tags (configurable)
  • Collapses whitespace inside text nodes
  • Shows original size, minified size, and bytes saved
  • Copy or download minified HTML
  • Browser-only

How to use it

  1. Paste your HTML into the input panel.
  2. Choose minification options (comments, attributes, whitespace).
  3. Minified output appears with size reduction stats.
  4. Copy or download the result.

Use cases

  • Reducing HTML payload size for performance
  • Minifying email HTML templates before sending
  • Compressing HTML for deployment builds
  • Auditing how much whitespace HTML contains

Limitations

  • Pre-formatted content inside <pre> tags is not touched.
  • Significant whitespace in inline elements (like spaces between spans) may be collapsed, review output before use.
Questions & answers

Frequently asked

Does it minify inline CSS and JavaScript?

Basic whitespace reduction is applied to inline styles and scripts. For full CSS/JS minification, use a dedicated CSS or JS minifier.