Keyword Density Checker
Find the words and phrases your copy actually leans on.
Strip comments and dead whitespace out of a page.
The HTML Minifier removes comments and collapses the whitespace a browser would collapse anyway, with pre, textarea, script and style content lifted out and put back untouched. Whitespace is only removed entirely between block-level tags, where it was never rendered — between inline tags a space is a word gap, and removing it joins words together.
Paste a page and the minifier removes comments and collapses the whitespace a browser would collapse anyway. Anything inside pre, textarea, script and style is lifted out first and put back untouched, because whitespace in those places is not decoration.
The approach here is deliberately conservative. Collapsing a run of whitespace to a single space is exactly what the rendering engine does, so it cannot change how the page looks. Removing whitespace entirely is only done between block-level tags, where it was never rendered; between inline tags a space is a word gap, and removing it joins words together — which is how aggressive minifiers produce pages that read as though the spacebar broke. What this will not do is rewrite attributes, drop optional tags or shorten booleans, all of which save a little and need a careful look at the result.
pre, textarea, script and style are lifted out before anything is collapsed and restored exactly.
Collapsing to a single space is what the rendering engine does, so it cannot change the page.
Whitespace is removed entirely only where it was never displayed in the first place.
They are markup for old browsers, not commentary, so removing them removes behaviour.
Raw and minified sizes with the percentage saved, so you can see whether it was worth it.
A full page or a fragment. Nothing is uploaded — the work happens in your browser.
Comments, whitespace collapsing and block-level tag gaps are separate options.
Before and after sizes are shown, with the percentage and the gzipped estimate.
Take the result, or download it as a file.
The way this does it, yes. Collapsing whitespace to a single space is what the browser does when rendering, and whitespace between block-level tags was never displayed. Content inside pre, textarea, script and style is protected, so the risky cases are excluded rather than handled.
Typically 10 to 25 percent of the raw file on a well-indented page. Once gzip is applied the difference narrows considerably, because compression handles repeated whitespace very well. It is worth doing and it is not where your page weight problem is.
Compression first, every time — gzip or brotli saves far more, costs nothing to switch on, and applies to everything you serve. Minify afterwards if you still want the bytes.
Because they are not comments to the browsers that read them. A conditional comment is markup for old Internet Explorer, and removing it removes functionality rather than noise.
What people who use the HTML Minifier think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the HTML Minifier. It takes half a minute and no account.
Write the first reviewFind the words and phrases your copy actually leans on.
Classify keywords as informational, commercial, transactional or navigational.
VideoObject markup with duration, thumbnail and key moments.
Dates, venue, tickets and status as Event JSON-LD.
Measure title tags in pixels, the way Google actually truncates them.
Generate JSON-LD structured data for rich results.
Write a valid ads.txt so your ad inventory is not spoofed.
Decode tagged links and check the campaign naming holds together.