Workspace

HTML minifier

Collapse whitespace and drop comments in HTML (does not touch <pre>/<script> contents).

Result

Run the tool to see results here.

About HTML minifier

HTML minifier is a free online developer tool. Collapse whitespace and drop comments in HTML (does not touch <pre>/<script> contents).

Enter your input, adjust the options and run it. The result appears right next to the form, is never stored, and you can copy or save it in one click. No account is needed.

How to use HTML minifier

  1. Type or paste your input into the form.
  2. There is nothing to configure, the defaults work for most inputs.
  3. Press Run, or use Ctrl/⌘ + Enter.
  4. Copy or save the result from the panel on the right.

HTML minifier FAQ

What does HTML minifier do?

Collapse whitespace and drop comments in HTML (does not touch <pre>/<script> contents).

Is HTML minifier free to use?

Yes. HTML minifier is free, with no sign-up or account required.

Is my data safe?

Results are never stored. See our privacy policy for details.

More developer toolbox tools

See all Developer toolbox tools →

Popular on Toolsera