SuperSEOPlus

Website Management Tools

Code to Text Ratio Checker

Enter a page address and see how much of its HTML is visible text and how much is code and markup. You get the sizes, the percentage and a plain explanation. The figure describes a page; it is not a score, and Google has said it is not a ranking factor.

How to use it

  1. Enter the address of a public page.
  2. Press Check ratio.
  3. Read the share of text, then use the sizes to judge whether the page is heavy with markup or scripts.

Example

A long article with a clean template may be 25% text. A page that is mostly a script-built app may be under 5% because its content is loaded later.

The ratio depends on the template as much as on the content. Compare similar pages on the same site.

What the ratio means

It compares visible text with the HTML around it. A very low ratio can mean a page is mostly markup, scripts and styles with little real content, which is worth a look. There is no ideal percentage that search engines require, and a high ratio does not make a page good.

The ratio is worked out from the HTML our server receives. Text added later by scripts is not part of the calculation.

Common mistakes

  • Cutting useful markup to raise the number.
  • Comparing pages of different types: an app page and an article will differ.

Questions

What is a good code to text ratio?

There is no official figure. Some tools suggest 10 to 25% as a rule of thumb. Google has said that code to text ratio is not a ranking factor, so treat it as a clue about page weight rather than a target.

How is the ratio calculated?

The visible text outside scripts, styles and comments, in bytes, divided by the size of the HTML document, in bytes.

Why is my page very low?

Common causes are large inline scripts or styles, heavy page-builder markup, or content loaded by JavaScript. Moving scripts and styles into cached files often helps.

Does it run JavaScript?

No. Text added by scripts after loading is not counted, so very script-driven pages can look worse than they are for visitors.

How much of the page is read?

Up to the first 256 KiB of the HTML. Larger pages are flagged, and the ratio covers only that part.

Get practical SEO tips by email

Occasional emails with new guides and tools. Confirm by email first; unsubscribe in one click.