FreeDev Tools

HTML Minifier

Minify HTML β€” remove comments and inter-tag whitespace while preserving pre and script blocks.

Runs locally in your browser. Your input is not uploaded.

How to Use

  1. 1

    Paste your HTML

    Full pages or fragments both work.

  2. 2

    Choose comment handling

    Comments are stripped by default; tick the option to keep them.

  3. 3

    Copy the single-line output

    A footer comment reports the byte savings.

Frequently Asked Questions

It removes HTML comments and collapses whitespace between tags into nothing and runs of spaces into one β€” while pre, textarea, script, and style blocks are protected so their content is untouched.