HTML Minifier
Conservatively remove standalone HTML comments while preserving document whitespace.
Result
Enter your values. Your result will appear here.
How it works
- Paste an HTML fragment.
- Run to remove ordinary comments outside protected text elements.
Example & practical use
<p>Hello</p><!-- note --> → <p>Hello</p>
What to know
Preserves all whitespace, script/style/pre/textarea bodies, conditional comments, Knockout comments, and comments beginning # or !. This conservative tool does not optimize JavaScript, CSS, or attributes, and is not an HTML validator. Inputs are limited to 200,000 UTF-16 code units. Text is processed locally.
Are my files or inputs uploaded?
Image and text processing happens in your browser. Your files are not uploaded to our servers.
Found an issue?
We are improving this alpha release. Tell us the tool, your device and the expected result through the contact page. You do not need to share private inputs or original files. Contact