Free website audit in 60 seconds
Skip to content
Webmaster.ae
  • Loading…
Webmaster.ae
Free website auditSpeed, SEO, security and email, with a PDF report

Follow us

Runs in your browserFree · no sign-up

HTML minifier

Paste HTML to remove comments and unnecessary whitespace and see how many bytes you save. Content inside <pre>, <textarea>, <script> and <style> is left exactly as it is.

Live resultUpdates as you type

Press “Minify HTML” to see the result here.

How do I use the HTML minifier?

HTML minifier: frequently asked questions

Will minifying break my page?

Rarely. Whitespace between tags is removed, which can affect inline elements that rely on a space between them. Check the result visually.

Does it minify CSS and JavaScript too?

No. Inline <style> and <script> are kept as they are. Use our CSS minifier for CSS.

Are conditional comments kept?

Yes. Comments starting with <!--[if are kept.

How much does minifying help?

Typically 5–20% before compression. With gzip or Brotli on your server the gain is smaller but still real.

Is my HTML uploaded?

No. Minifying runs in your browser.

Should I minify by hand?

For production sites, let your build tool or CMS plugin do it automatically. This tool is ideal for one-off snippets and emails.

Does it help Core Web Vitals?

Smaller HTML downloads faster, which can help LCP slightly, especially on slow mobile connections.

Can I minify email templates?

Yes, and smaller emails are less likely to be clipped by Gmail, which clips messages over about 102 KB.

Is there an API for this tool?

Selected tools are available through a rate-limited public API. Contact us if you need higher volumes.

Is the html minifier free?

Yes. It is free with no sign-up and no usage limits for normal use.