Skip to content
โšก

HTML Minifier

Developer

Remove ordinary HTML comments and trim whitespace at the start and end of a snippet. This conservative minifier keeps text spacing, quoted attributes and raw-element contents intact so inline words do not run together.

0
0
HTML
Minified
 - 

Remove ordinary HTML comments and trim whitespace at the start and end of a snippet. This conservative minifier keeps text spacing, quoted attributes and raw-element contents intact so inline words do not run together.

See more about the HTML Minifier

Examples

Keep the word separator

<span>Hello</span> <span>world</span><!-- remove -->
Result: <span>Hello</span> <span>world</span>

It preserves script, style, pre, title and textarea contents, conditional comments and comments beginning with <!--!. It does not minify JavaScript or CSS, collapse internal whitespace or remove optional tags. Unclosed comments, tags and raw elements return errors. Input limit: 100,000 characters.

Key features

  • Ordinary comment removal
  • Inline spacing preserved
  • Copy output and compare bytes

Quick answers for HTML Minifier

What does this tool produce?
Remove ordinary HTML comments and trim whitespace at the start and end of a snippet. This conservative minifier keeps text spacing, quoted attributes and raw-element contents intact so inline words do not run together.
What are the limits and important options?
It preserves script, style, pre, title and textarea contents, conditional comments and comments beginning with <!--!. It does not minify JavaScript or CSS, collapse internal whitespace or remove optional tags. Unclosed comments, tags and raw elements return errors. Input limit: 100,000 characters.