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.
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.
Paste HTML above and the result appears here.
- Runs in your browser
- No account required
- Free to use
How it works
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.
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.
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.
Related tools
JSON Formatter
Format and minify JSON, with errors that name the line.
Runs entirely in your browser
Open toolJSON Validator
Check JSON and get the line, column and cause of any error.
Runs entirely in your browser
Open toolJSON Viewer
Explore JSON as a collapsible tree instead of scrolling it.
Runs entirely in your browser
Open toolJSON to CSV
Turn an array of objects into a spreadsheet-ready CSV.
Runs entirely in your browser
Open toolWho 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.
Web Design
Custom, conversion-focused web design that captivates visitors and turns them into paying customers. Mobile-first, fast, and built to rank.
Web Development
Custom WordPress websites built with clean code, blazing-fast performance (Core Web Vitals optimised), and enterprise-grade security.
E-Commerce
Online stores that convert visitors to customers with seamless shopping experiences.
SEO
Technical SEO, keyword research, on-page optimisation and local SEO strategies that drive qualified organic traffic.
Digital Marketing
Data-driven campaigns that deliver measurable ROI across every channel.
Branding
Memorable brand identities that stand out in any market and build lasting trust.
Website Help
One-on-one expert support for bug fixes, updates and ongoing maintenance — without a long-term retainer.
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.