HTML Minifier
Shrink a page's HTML without changing how it renders. Nothing is uploaded or stored.
Minify
Warning: removing optional closing tags can change rendering in some browsers — use with care.
Paste HTML first.
Result
Before—
After—
Saved—
Preview — the minified page rendered
If the preview looks the same as the original page, the minification is safe.
How the minifier works
Removed. Comments, and whitespace between tags where it cannot change the text — a space between two inline elements (a and b) is kept.
Never touched. Everything inside <pre>, <textarea>, <script> and <style> is byte-identical.
Optional. Attribute quotes are stripped only when the value has no spaces or special characters and does not end in /. Optional closing tags are only removed where the HTML rules allow it.
Local only. All work happens in your browser. Nothing is uploaded, stored or shared.