ToolVyne

HTML Minifier

Paste HTML to strip comments and collapse whitespace between tags, while leaving the content of <script>, <style>, <pre> and <textarea> untouched.

HTML input
Minified output

221149 characters (-33%)

Content inside <script>, <style>, <pre> and <textarea> tags is left untouched.

Ad space

Frequently asked questions

Will this break my JavaScript or CSS?+

No, the contents of <script> and <style> tags are protected and passed through unchanged, since minifying them safely requires a full JS/CSS parser.

Does it minify attribute values?+

No, tag attributes are copied through byte-for-byte; only whitespace between tags in the surrounding text is collapsed.

Why keep whitespace inside <pre> tags?+

Because whitespace inside <pre> and <textarea> is meaningful to how the browser displays it, so altering it would change the visible output.

ToolVyne uses cookies to show ads that keep every tool free. You can accept ad personalization or reject it and still use the site normally. See our Privacy Policy for details.