ToolFeather
Developer / SEORuns in your browser

HTML Minifier

Shrink your HTML by removing comments and the whitespace browsers ignore between tags.

Quick presets

HTML Minifier

Drops comments and whitespace, unquotes safe attributes; <pre>, <textarea> and scripts preserved.
HTML
Result

Runs in your browser — nothing you enter is uploaded or stored.

ToolFeather · Smaller pages
Scratchpad auto-saved
Stored in this browser (localStorage)

About the HTML Minifier

HTML files are full of whitespace and comments that make the source readable but add weight the browser doesn't need. Minifying removes HTML comments and collapses the runs of spaces and line breaks between tags, trimming the download without changing how the page renders.

This minifier is careful with content where whitespace matters: the contents of <pre>, <textarea>, <script>, and <style> are preserved exactly, and conditional comments (<!--[if …]-->) are kept. It reports the bytes saved so you can gauge the benefit.

Everything runs in your browser. For a full site, running minification as part of your build gives the most consistent results, but this is perfect for quick one-off optimisation and inspecting how much a page can shrink.

Examples

Indented markup → tags packed together with no gaps.
HTML comments removed, but <pre> content left untouched.
See the percentage saved before shipping a landing page.

Frequently asked questions

4 answers
Will minifying break my page?
No. It preserves whitespace-sensitive elements (pre, textarea, script, style) and only removes ignorable whitespace and comments elsewhere.
Are conditional comments kept?