Skip to content

Ready

Enter a domain on the left and run the test. Results stream in here.

Readable text versus markup: the ratio explained

This tool fetches a page, strips out everything that is markup, scripts, and styling, and compares the size of the readable text that remains against the size of the full HTML document. The result is a percentage: how much of what your server sends down the wire is actual content a person would read versus how much is the scaffolding browsers need to display it. A page that is mostly text scores high; a page buried under inline scripts and bloated markup scores low.

The number itself is not a Google ranking factor, and you should be skeptical of anyone who claims a magic threshold. What it really is, is a fast, cheap proxy for two things that do matter: whether a page has enough substantive content to be worth ranking, and whether the page is carrying so much code weight that it will be slow and hard to render. Think of it as a health check, not a score to game.

How the ratio is calculated

The checker takes the raw HTML response, the same bytes a crawler downloads before any JavaScript runs, and measures its total size. Then it removes the tags, the contents of script and style blocks, comments, and other non-visible markup, leaving the plain text. It divides the size of that text by the size of the full document and reports the percentage, often alongside the raw character or byte counts so you can see the absolute numbers behind the ratio.

Because it works on the raw HTML rather than the rendered page, the ratio reflects what arrives before client-side rendering. If your content is injected by JavaScript after load, the raw HTML may be almost all code with very little text, which is itself a useful warning: a page that ships an empty shell and builds its content in the browser is harder for crawlers and AI bots to read reliably.

What a low, middling or high ratio tells you

There is no universal pass mark, but the shape of the result tells a story. A content page, a blog post, a guide, a product description, that comes back with a very low text ratio usually means one of two problems: the page is genuinely thin on words, or the HTML is bloated with inline scripts, tracking snippets, and heavy framework markup that dwarf the actual writing. Either is worth investigating.

A higher ratio on a content page is generally a good sign, but do not chase the percentage for its own sake. A landing page that is mostly a hero image and a form will always have a low ratio and that is fine, because its job is conversion, not reading. Always interpret the number against what the page is for. The ratio is most useful when it surprises you, when an article you thought was substantial turns out to be mostly markup.

What drags a ratio down

The biggest culprit is inline JavaScript and CSS, large blocks of code pasted directly into the HTML instead of loaded from external files. Tag managers, analytics, chat widgets, and consent banners all love to inject inline script, and on a lightly written page they can easily outweigh the content several times over. Moving that code to external, cacheable files cuts the HTML size and lifts the ratio without touching a word of content.

Bloated, deeply nested markup is the other big factor. Page builders and some component frameworks wrap every element in layers of div tags with long class lists, so a paragraph of text ships inside a paragraph of markup. Excessive whitespace, repeated boilerplate, and giant inlined SVGs or data-URI images pad the HTML further. None of it helps the reader and all of it slows the download and the parse.

Raw HTML versus the rendered page

It is worth being precise about which version of the page this tool measures. It reads the raw HTML your server returns, before a browser executes any JavaScript. That is deliberate, because it matches the first thing a crawler downloads. A page can look content-rich in the browser yet ship a raw document that is almost entirely code, with the words painted in afterward by script. The ratio exposes exactly that gap.

If your text ratio is very low and you know the page has plenty of content, client-side rendering is the likely cause. The content exists, but it is not in the bytes a crawler reads first. That is not just a ratio curiosity; it is a real indexing risk, because not every crawler and not every AI bot will run your JavaScript to reveal the text. Server-rendering or statically generating the important content puts it back into the raw HTML where every reader, human or machine, can find it.

The mistake of treating the ratio as a target

The classic error is reading an old SEO checklist, seeing a recommendation to keep text-to-HTML above some figure, and then padding pages with filler text to hit it. This is backwards. Adding low-value words to game a ratio produces exactly the kind of thin, padded content that the helpful-content systems demote. The ratio is a symptom you read, not a quota you fill.

The right response to a low ratio is to ask which side of the fraction is wrong. If the text is genuinely too thin for the topic, write more, real, useful content. If the text is fine but the code is heavy, trim the code. You almost never fix a low ratio by stuffing keywords or boilerplate; that just trades one quality problem for another.

The ratio as a quick triage across many pages

Where this check earns its keep is triage at scale. Run it across a batch of pages and the outliers jump out: the article that scores like a thin landing page, the product description that is all template and no words, the category page where boilerplate has crowded out the unique content. You are not looking for pages that hit a number; you are looking for pages whose ratio is wildly out of line with their purpose.

Those outliers are your shortlist for a closer read. A genuinely thin page might need to be expanded, merged with a sibling, or removed entirely if it adds nothing. A code-heavy page might need its scripts cleaned up. Either way, the ratio has done the valuable part, pointing your limited attention at the handful of pages that actually need work instead of leaving you to read every one by hand.

Why a clean HTML-to-text balance helps crawlers and AI

Search crawlers and AI bots have to download and parse your HTML to find the content worth indexing or citing. A page that is mostly code costs them more to process and gives back less, and bots running on a crawl budget may not render the JavaScript that would reveal the missing text. Lean HTML with the content present in the raw response is the most crawler-friendly thing you can ship.

AI answer engines in particular reward content they can extract cleanly. When your meaningful text sits in the HTML rather than behind a wall of script, systems like AI Overviews, ChatGPT search, and Perplexity can read, summarize, and cite it without the rendering gymnastics that make a page unreliable to quote. A healthy text-to-HTML balance is a quiet accessibility win for both human readers and machine ones.

How the ratio relates to page weight and speed

A low text ratio and a slow page often share the same root cause: oversized HTML. Every kilobyte of inline script, repeated markup, and padding has to travel down the wire and be parsed by the browser before anything useful happens. So the ratio is not only a content signal; it is an early hint that the document itself is heavier than it needs to be, which shows up later as sluggish load times and worse Core Web Vitals.

That makes the ratio a useful companion to a proper speed test such as our page speed testrather than a replacement for one. If the ratio is low because of code bloat, the same trimming that lifts it, externalizing scripts, cutting unused markup, deferring third-party tags, also makes the page faster. Treat a poor ratio on a code-heavy page as one symptom of a bigger performance story, and fix the cause once to improve both numbers at the same time.

Moving inline code out of the HTML

The most reliable way to lift a code-heavy page's ratio is to move large inline style and script blocks into external files. The browser downloads those once and caches them, instead of receiving the same code inside every HTML page. Keep only small, genuinely critical CSS inline.

<!-- Before: code pasted into every page's HTML -->
<head>
  <style>
    .hero{display:flex;gap:2rem}.card{border:1px solid #ddd}
    /* ...400 more lines of CSS... */
  </style>
  <script>
    window.chatWidgetConfig = { /* ...a large settings object... */ };
    /* ...widget loader code... */
  </script>
</head>

<!-- After: the same code in cached external files -->
<head>
  <link rel="stylesheet" href="/assets/site.css">
  <script src="/assets/chat-widget.js" defer></script>
</head>

WordPress

Page builders and plugins are the usual source of bloat: nested wrapper divs from the builder, and inline scripts from sliders, popups and chat tools loaded on every page. Remove plugins you no longer use, switch heavy builder sections to native blocks where you can, and use a performance plugin's option to load scripts only on the pages that need them.

Shopify

Apps add their code through app embeds and snippets in theme.liquid. Turn off embeds for apps you no longer use in the theme editor's App embeds panel, and check theme.liquid for leftover snippets after uninstalling an app, since some leave code behind.

Server and CDN settings

Gzip or Brotli compression on Nginx, Apache or Cloudflare shrinks what travels over the network, but it does not change the ratio, because markup and text are both compressed. Note too that Cloudflare retired its Auto Minify feature in 2024, so minification now has to happen in your build or theme. The structural fix, less code in the HTML, is what moves the number.

Raising the ratio by fixing the cause

If the ratio is low because of heavy code, move inline scripts and styles into external files, defer non-critical third-party scripts (the Render-Blocking Resources checker lists them), and lean on your platform to reduce the markup wrapping each element. Audit the tag manager and remove anything firing on every page that does not need to. These changes lift the ratio and speed up the page at the same time, which is the real prize.

If the ratio is low because the page is thin, expand the content with depth that actually serves the reader, examples, specifics, answers to the questions people bring to the page, rather than filler. Then re-run the checker to confirm the balance has shifted in the right direction, and pair it with the Page Speed Test and our page speed guide to make sure the underlying bloat is gone, not just diluted by added words.

How it works

  1. Enter a URL

    Paste any public page URL. We download the raw HTML exactly as a crawler would receive it.

  2. We Strip the Markup

    Scripts, styles, and all HTML tags are removed to isolate the visible text, then both sizes are measured in bytes.

  3. Review the Ratio

    See the text size, HTML size, and the content percentage, with a verdict on whether the page may be markup-heavy.

Frequently asked

What is the text-to-HTML ratio?

›

It is the size of the visible text on a page divided by the total size of the raw HTML document, shown as a percentage. A page that is 5 KB of readable text inside 100 KB of HTML has a 5 percent ratio. It is a rough indicator of how much of your markup is actual content versus structural code, inline scripts, and styling.

What is a good text-to-HTML ratio?

›

There is no official threshold, but many practitioners aim for 10 percent or higher on content pages. Values below about 5 percent often mean the page is heavy with inline scripts, bloated markup, or thin content. Do not chase a number for its own sake; use a low ratio as a prompt to investigate bloat, not as a problem in itself.

Does Google use the text-to-HTML ratio as a ranking factor?

›

No. Google has never confirmed it as a direct ranking factor, and it is not one. Its value is diagnostic: a very low ratio can correlate with heavy, slow markup or thin content, both of which affect real ranking factors like page speed and content quality. Treat it as a smell test for page health.

Why is my ratio so low even though my page has lots of content?

›

Usually because of large inline JavaScript, framework hydration data, inline SVGs, base64 images, or heavily nested markup. These inflate HTML size without adding readable text. Moving scripts to external files, removing unused markup, and avoiding base64-embedded assets all raise the ratio.

How is the text measured in this tool?

›

We fetch the raw HTML, then strip out script and style blocks and all HTML tags, collapsing whitespace to get the visible text. We compare the byte size of that text to the byte size of the full HTML document. We report both sizes plus the resulting percentage.

Can a high ratio ever be bad?

›

Rarely, but yes. An unusually high ratio can mean a page is almost all raw text with little structure, navigation, or schema, which can hurt usability and rich-result eligibility. The sweet spot is a page with substantial content wrapped in clean, purposeful markup, not one extreme or the other.

Does this measure the rendered page or the raw HTML?

›

It measures the raw HTML response, which is what search engine crawlers download first. If your content is injected by client-side JavaScript after load, it will not appear in the raw HTML and the ratio will look low. That is itself a useful warning: content that only exists after JavaScript runs is harder for crawlers and AI bots to read.

Related tools

More On-Page SEO tools

See all On-Page SEO tools · All free SEO tools

Related guides

↳ full site audit190+ checks · AI fix instructions · yearly plans