HomeAPI StatusFree ToolsSEO Help Articles

HTML Page Size Test

The HTML Page Size Test measures the raw and compressed bytes of the HTML document returned by any URL — separate from the images, scripts and stylesheets it pulls in. Bloated HTML is a hidden performance cost: large initial HTML increases Time to First Byte and First Contentful Paint, and on JavaScript-rendered pages it often signals huge inline JSON payloads from server-side data hydration.

What This Tool Checks

  • Raw HTML bytes (uncompressed)
  • Compressed HTML bytes (gzip / Brotli)
  • Compression ratio achieved
  • Inline data / JSON payload size
  • Inline CSS and JavaScript bytes
  • Comments and whitespace overhead

Why It Matters for SEO

Every byte of HTML is on the critical render path. Large HTML pushes back TTFB, FCP, LCP and Speed Index simultaneously. JavaScript-rendered apps frequently inline 100+ KB of JSON for client hydration — invisible to most page-weight tools but very visible to Lighthouse and to user load times. Trimming inline data, splitting hydration payloads and removing comments / whitespace are usually low-effort, high-impact fixes.

How to Fix It

Enable Brotli compression at the origin. Split inline JSON payloads — only ship what is needed for above-the-fold render and lazy-load the rest. Move inline CSS / JS to external files where they can be cached across pages. Strip comments and whitespace in production builds. Aim for under 50 KB compressed HTML on most page templates.

How It Works

We fetch the URL's HTML, measure the raw and on-the-wire compressed bytes, then break the payload into structural HTML, inline CSS, inline JavaScript, inline JSON / data and comments. Each category is reported with reduction recommendations.

Common Mistakes to Avoid

  • Inlining the entire dataset on first request when most is below the fold
  • Server-side rendering pages with no compression at the origin
  • Leaving dev-mode comments and whitespace in production HTML
  • Inlining large CSS / JS that should be external and cacheable
  • Returning the same large HTML for every paginated URL variant

Quick Checklist

  • Compressed HTML under 50 KB on most templates
  • Brotli or gzip enabled at origin
  • No huge inline JSON payloads
  • Inline CSS / JS minimised
  • Comments and whitespace stripped in production

Frequently Asked Questions