---
title: "HTML Minifier: Remove comments and whitespace from HTML"
canonical: "https://openvibe.tools/tool/htmlminify"
updated: null
---

# HTML Minifier: Remove comments and whitespace from HTML

HTML: [HTML Minifier: Remove comments and whitespace from HTML](https://openvibe.tools/tool/htmlminify)

# 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.

- **Limits** No daily limit on the page
- **Where it runs** Runs in your browser; nothing is uploaded.
- **Cost** Free, with the limits above. No account needed.

 [Open HTML Minifier](https://html-minifier.openvibe.tools/) 

## Where to find it

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

- [htmlminify.openvibe.tools](https://htmlminify.openvibe.tools/)Easiest to remember
- [html-minifier.openvibe.tools](https://html-minifier.openvibe.tools/)Search-friendly address
- [minifyhtml.openvibe.tools](https://minifyhtml.openvibe.tools/)Redirects here
- [htmlmin.openvibe.tools](https://htmlmin.openvibe.tools/)Redirects here
- [html-compressor.openvibe.tools](https://html-compressor.openvibe.tools/)Redirects here

## 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.

- html minifier
- minify html
- html compressor online
- compress html
- minify web page

## Use it from code

- `POST https://openvibe.tools/api/v1/tools/htmlminify/run`
- No account needed: anonymous calls run on the lowest quota tier; a token with `tools.tool.run` raises it.
- It answers with the result.

~~~~
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](/api/v1/tools/htmlminify/schema) · [OpenAPI](/api/v1/openapi.json) · from JavaScript: `tools.run("htmlminify", …)` in [openvibe-sdk](https://github.com/OpenVibers/OpenVibe.SDK) · [How the API works](/developers)

## Similar tools

[All Developer Tools](/developer-tools)

[ **YAML to JSON Converter** Convert YAML to JSON and JSON to YAML online, and validate *yaml.openvibe.tools*](https://yaml.openvibe.tools/) [ **XML Formatter** Format, validate and minify XML online *xml.openvibe.tools*](https://xml.openvibe.tools/) [ **CSV to JSON Converter** Convert CSV to JSON and view CSV as a sortable table online *csv.openvibe.tools*](https://csv.openvibe.tools/) [ **SQL Formatter** Format and beautify SQL queries online *sql.openvibe.tools*](https://sql.openvibe.tools/) [ **HTML Formatter** Format, minify and escape HTML online *html.openvibe.tools*](https://html.openvibe.tools/) [ **Base64 Encoder & Decoder** Encode text to Base64 and decode Base64 back to text online *base64.openvibe.tools*](https://base64.openvibe.tools/)

## The rest of OpenVibe

5 links

One account works on every site. Open source and community-run.

[**OpenVibe.Live** Live streams, clips and chat](https://openvibe.live/) [**OpenVibe.Community** Pastes, posts and people](https://openvibe.community/) [**OpenVibe.Games** Browser games](https://openvibe.games/) [**OpenVibe.Media** VODs, clips and files](https://openvibe.media/) [**OpenVibe.Network** One account for every site](https://openvibe.network/)
