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.

Open HTML Minifier

Where to find it

Every address below opens the same tool. The first address is the one to bookmark and share.

People also call this

What it's for: Remove comments and whitespace from HTML. Make an HTML document smaller by removing comments and the whitespace between tags.

What trips people up: 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

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>"}}'

Inputs: JSON Schema · OpenAPI · from JavaScript: tools.run("htmlminify", …) in openvibe-sdk · How the API works

Similar tools

All Developer Tools