Skip to content
ConvenTools

HTML Minifier

Runs in your browser — your files never leave your device

Minify HTML to shrink page weight: comments are stripped and whitespace between tags is collapsed, while the contents of <pre>, <textarea>, <script> and <style> are left untouched. It all runs in your browser.

7850 bytes · 36% smaller

How to use it

  1. 1
    Paste HTML

    Paste your HTML markup into the input box.

  2. 2
    See the minified output

    Comments and extra whitespace are removed live, and the size saved is shown.

  3. 3
    Copy

    Copy the minified HTML with one click.

Safe, conservative minification

Smaller HTML means fewer bytes to download and faster first paint. This minifier removes comments and redundant whitespace — the low-risk wins — without rewriting your markup or attributes.

Whitespace-sensitive regions are protected: anything inside <pre>, <textarea>, <script> or <style> is preserved exactly, so formatted code blocks and inline scripts keep working.

Frequently asked questions

Does it touch my scripts or styles?

No. The contents of <pre>, <textarea>, <script> and <style> are preserved exactly — only whitespace between tags and comments are removed.

Is my HTML uploaded anywhere?

No. Minification runs entirely in your browser; your markup never leaves your device.

Are conditional comments kept?

Yes. Internet Explorer conditional comments (<!--[if ...]>) are preserved; ordinary comments are removed.