Code and data

HTML Minifier

Remove comments and whitespace from HTML.

  • Free
  • Runs in your browser: nothing is sent
  • API: 120 runs a minute without an account
  • No sign-up
About HTML Minifier

Make an HTML document smaller by removing comments and the whitespace between tags. Useful for email templates, embedded snippets and static pages where every kilobyte is sent on each request.

  • Removes comments and inter-tag whitespace
  • Keeps the content of pre, textarea, script and style intact
  • Runs in your browser
Questions · 1

Can minifying break my layout?

Whitespace between inline elements can be meaningful. The minifier collapses it to a single space rather than removing it, which keeps inline text spacing correct.

Use it from code · API

Input: text. No account needed within the free limit; a token with tools.tool.run raises it.

curl -X POST https://openvibe.tools/api/v1/tools/htmlminify/run \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"<!-- c -->\n<div>\n  <p>Hi</p>\n</div>"}}'

JSON Schema · OpenAPI · API docs