Pixelquil logoPixelquil

Text-to-HTML Ratio Checker

Check the ratio of visible text to total HTML markup on a page, a signal some SEO audits still flag.

Paste HTML or fetch a URL to see the breakdown.

How it works

  1. 1

    Paste HTML or fetch a URL

    Paste a page's full HTML directly, or enter a live URL and click Fetch.

  2. 2

    Review the stats

    Check total HTML size, visible text size, the resulting ratio, and word count.

  3. 3

    Look at the composition breakdown

    See exactly how much of the page's weight comes from text, markup, inline scripts, inline styles, comments, and hidden elements.

  4. 4

    Use it as context, not a verdict

    There's no official pass or fail threshold, treat the result as a starting point for understanding what's contributing to page weight.

About the Text-to-HTML Ratio Checker

Text-to-HTML ratio is a holdover metric from older SEO audit tools, and it's worth saying upfront, Google has never confirmed it as a ranking factor and has downplayed it directly more than once. This tool still checks it properly, correctly separating actual visible text from scripts, styles, comments, and hidden elements rather than naively comparing raw character counts, and shows a full breakdown of where a page's HTML weight actually goes, which is more useful than the ratio number on its own.

Why a naive ratio calculation gets this wrong

A simple version of this check just compares the total character count of a page's HTML source against its stripped-down text, which massively overcounts "text" on any modern page, since script and style tag contents, HTML comments, and elements deliberately hidden with display:none all get counted as if they were content a visitor actually reads. This tool walks the actual parsed structure of the page and separates those categories explicitly, so the visible text figure reflects what a person looking at the rendered page would actually see, not what happens to sit between angle brackets somewhere in the source.

Why the breakdown matters more than the single percentage

A low ratio on its own doesn't say much, a page could be text-light because of a heavy JavaScript framework, because of a large inline stylesheet, or just because it genuinely has very little written content, and those are three completely different situations calling for three completely different responses. Seeing the actual composition, how many bytes are inline script versus inline style versus markup versus real text, points at what's actually contributing to the page's weight, which is a more useful starting point than a bare number with no context behind it.

What this can't see

Only the HTML that's actually in the page's source is measured, an external script or stylesheet loaded through a src or href attribute contributes nothing to this calculation beyond the weight of that one reference tag itself, since the linked file's own content was never part of the HTML in the first place. A page that looks light in this checker because most of its logic lives in an external bundle isn't necessarily lighter overall, this tool is specifically about the markup itself, not a page's total network payload.

Why there's no pass or fail badge here

Some older SEO tools cited a rough figure, often somewhere around 25%, as a healthy threshold, but that number was never an official standard and Google has explicitly said this isn't something it uses as a ranking signal. Presenting the ratio with a green or red verdict would imply a precision and authority this metric doesn't actually have, so it's shown here as a plain, informational figure, worth knowing for general content-density awareness, not something to chase toward an arbitrary target.

Runs entirely in your browser

Analysis happens locally on whatever HTML you provide, nothing is uploaded. Fetching a URL does route through this site to retrieve that page's content, but the breakdown itself is calculated entirely on your device. If bloated markup turns out to be the culprit, our Developer Utilities collection has related cleanup tools, and our Technical SEO collection this tool belongs to covers the rest of a page's on-page signals.

Frequently asked questions

Is text-to-HTML ratio an actual Google ranking factor?

No, Google has not confirmed this as a ranking signal and has downplayed it directly. It's a legacy metric from older SEO audit tools, shown here as an informational figure rather than a pass or fail check.

Why doesn't a naive character count give an accurate result?

A simple comparison of raw text length to raw HTML length counts script and style tag contents, comments, and hidden elements as if they were visible content, which significantly overstates the actual text on modern pages.

What counts as 'hidden' in the breakdown?

Elements with a hidden attribute, an inline style containing display:none, or aria-hidden set to true. CSS-based hiding through an external stylesheet can't be detected, since only the HTML markup itself is analyzed.

Does this count the size of external JavaScript or CSS files?

No, only content actually present in the HTML is measured. A script or stylesheet loaded through src or href contributes only the weight of that reference tag, not the linked file's own content.

Why is there no recommended target percentage?

Older tools cited rough figures like 25% as a guideline, but that was never an official standard, and Google doesn't treat this as a ranking signal. A specific target would suggest more precision than the metric actually has.

What does the composition breakdown actually help with?

It shows where a page's HTML weight comes from, text, markup, inline scripts, inline styles, comments, or hidden content, which is more actionable than the ratio number alone for understanding what's driving page weight.

Does word count include text inside hidden elements?

No, word count is calculated the same way as the visible text figure, excluding scripts, styles, comments, and elements hidden through the checks this tool detects.

Is my HTML uploaded anywhere?

No, analysis happens entirely in your browser. Fetching a URL routes through this site to retrieve that page's content, but the breakdown itself runs locally.