Home / Developer Tools / HTML Minifier

HTML Minifier

Strip comments and whitespace from HTML.

How to use

  1. Paste your HTML.
  2. Click minify.
  3. Copy the compact result.

Frequently asked questions

Is it safe for <pre> content?

Whitespace collapsing can affect <pre> and inline formatting - review output where whitespace matters.

Related tools

  • CSS Formatter — Beautify CSS with Prettier-quality formatting.
  • CSS Minifier — Compress CSS by stripping comments and whitespace.
  • JavaScript Formatter — Format JS/JSX with the real Prettier engine.
  • JavaScript Minifier — Minify JS with Terser - the real production minifier.
  • SQL Formatter — Format SQL queries with uppercase keywords and clean indentation.
  • YAML Formatter — Re-indent and normalize YAML documents.

See all developer tools