Code & Data

Minify HTML without joining your words together

Paste HTML to strip what the browser does not need. Whitespace collapses to a single space rather than vanishing, because between two inline elements a space is content.

or paste your own — nothing is uploaded.

Whitespace collapses to a single space rather than disappearing, because between two inline elements a space is content. <pre> and <textarea> are left exactly as written.

Minified HTML

Paste HTML above and the result appears here.

  • Runs in your browser
  • No account required
  • Free to use

How it works

01

A space between inline elements is content

`<b>a</b> <b>b</b>` and `<b>a</b><b>b</b>` render differently — one has a gap between the words and the other does not. Removing whitespace entirely is what makes aggressively minified pages run their words together, so runs of whitespace collapse to one space instead of disappearing.

02

Conditional comments are markup

`<!--[if IE]>` is a comment to a modern browser and an instruction to an old one. Stripping it changes what those browsers do, so it is kept even when comments are being removed.

03

pre and textarea are left alone

Their whitespace is content. Collapsing it would reflow the code sample or empty the form field it was holding.

What it does

The saving, measured

Bytes before, bytes after, and the percentage.

Comments optional

Removed by default, with conditional comments preserved regardless.

Attributes untouched

No quote removal, no attribute reordering, no dropping of values it judges default. Those save little and break more.

Runs in your browser

No upload. What you paste in is never sent anywhere.

Practical advice

Getting a better result

  • Compression saves far more than minification does. Serve HTML with gzip or brotli first; minify as a bonus on top.
  • If minified output looks wrong, check for a missing closing tag in the original — the minifier recovers from it, but the recovery may not be what you intended.
  • Minified HTML formats back readably, so this is reversible in practice even though it is lossy in whitespace.

Questions

Things people ask

Why does it leave single spaces in?

Because a space between two inline elements is rendered, and removing it joins the words. Collapsing runs to one space is the safe version of the same optimisation.

Does it remove attribute quotes?

No. Unquoted attributes are legal but fragile, and the saving is a couple of bytes per attribute — far less than compression gets you and with real risk attached.

Who builds these

Free tools by day. Websites that earn their keep by trade.

KuConvert is built by KUDUY, a web design and development agency. From custom WordPress builds to SEO and e-commerce, everything they do is engineered to bring you more qualified traffic and turn it into revenue.

  • Fixed scope, no surprise invoices

    Most sites ship in four to eight weeks with the scope and the price agreed up front.

  • SEO from day one

    Search is designed into the build — structure, schema and Core Web Vitals — not retrofitted.

  • A team, not a ticket queue

    A project manager, a designer and a developer you can actually reach.

Need your whole site to load this fast?

Images are usually the heaviest thing on a page and the easiest win. KUDUY works on site speed, image delivery and Core Web Vitals for teams who would rather not do it by hand.

This tool runs entirely in your browser. Your files are never uploaded.