Tool Fu
$ toolfu run html-minifier

HTML Minifier — Minify HTML Code Online Free

Minify HTML code online for free. Remove comments, collapse whitespace, and reduce file size instantly in your browser.

all processing runs in your browser
html-minifier
options
input > paste HTML
original: 466 bytes
minified: 344 bytes
saved: 122 bytes (26.2%)
output > minified HTML

Free HTML Minifier

Minify HTML code to reduce file size. Remove comments, collapse whitespace, and optimize attributes.

Features

  • Remove HTML comments
  • Collapse whitespace
  • Minify inline styles
  • Before/after size comparison
  • 100% private — runs in your browser
$ cat FAQ.md
What does minification remove?
HTML comments, extra whitespace between tags, and optionally: attribute quotes, optional closing tags, and inline style whitespace.
Does it preserve <pre> and <code> blocks?
Yes. Content inside <pre>, <code>, <script>, <style>, and <textarea> tags is preserved as-is.
Is my HTML sent to a server?
No. Minification runs entirely in your browser using pure JavaScript. Nothing is uploaded.
How much can it reduce file size?
Typically 10–30% depending on the HTML structure and whitespace. The tool shows exact before/after byte counts.