Code to Text Ratio Checker

Measure how much of a page is readable text versus code, and find out what that number does and doesn't mean for SEO.

What the ratio tells you

The code-to-text ratio compares the visible words on a page with the total size of its HTML. A page that's 95% code and 5% text is either very light on content, very heavy on markup, or both.

Old SEO advice treated this ratio as a ranking factor. It isn't one. Google ranks pages on how helpful and relevant they are, and many excellent pages are built with lots of code. So don't chase a number.

When it's worth acting on

  • Thin pages. A low ratio plus a low word count often means a page doesn't say much. A service page with two sentences gives Google and customers little to go on.
  • Bloat. A low ratio on a page with plenty of text can mean heavy markup slowing it down. Check it with our page size checker.
  • Hidden content. If the text you see in the browser doesn't show up here, it may be loaded by JavaScript. See it the way a crawler does with the spider simulator.

The better question

Instead of asking whether the ratio is high enough, ask whether the page answers what customers want to know: what you do, where, how much it costs, and why they should pick you. Content that does that tends to fix the ratio on its own.

Questions

Is code-to-text ratio a Google ranking factor?

No. Google has never said it uses this ratio, and plenty of top-ranking pages have low ratios. Treat it as a quick bloat check, not a score to chase.

What's a good ratio?

There's no official target. Modern sites commonly land somewhere around 10–25%. A very low number on a page with little text is the one worth investigating.

How do you calculate it?

We divide the size of the page's visible text by the size of its full HTML. Scripts, styles and hidden template code count as code.

How do I improve it?

Add genuinely useful content (services, prices, FAQs, your area) and remove unused plugins, inline styles and bloated page-builder markup. Don't pad pages with filler text.

More free tools

See all tools