Kwebby
Hire Us50% off

Code to Text Ratio Checker

Measure how much of a page's HTML is visible text, for the full page or for the main content only. The ratio is a markup-weight check, not a ranking factor.

A page can show 500 readable words and still carry tens of kilobytes of markup. The Kwebby Code to Text Ratio Checker is a code to text ratio checker that fetches any URL, sets scripts and styles aside and reports what share of the page's HTML is visible text. You can measure the full page or only its main content. You get the ratio, a word count, a grade and a preview of the extracted text. This guide explains how to read those numbers and why Google says the ratio is not a ranking factor.

Key Takeaways

  • Enter a URL and click Analyze. The tool returns a Text Ratio percentage, a Words count, a Grade, an HTML Size and Text Size breakdown and an Extracted Text Preview.
  • A Measure option switches between Full page (the default) and Main content only, which counts the page's main element, its article elements, or the body without navigation, header, footer and sidebar.
  • The grade bands belong to the tool: Excellent at 25 percent or more, Good from 15 to 25, Average from 10 to 15 and Poor below 10. HTML size includes scripts and styles; text size leaves them out.
  • Google's John Mueller said in 2022 that the ratio is not, and never has been, a factor in SEO. Do not pad pages to raise it.
  • The score measures markup weight. In our test, example.com scored 30 percent (Excellent) with 27 words, while a longer page with 192 words scored 2 percent (Poor).
  • The extracted text preview is the fastest check. It shows what the tool counted, including menu text.
  • The tool is free and needs no account.

What Is the Kwebby Code to Text Ratio Checker?

The Kwebby Code to Text Ratio Checker is a free web tool that compares a page's visible text with its HTML. Type a URL, click Analyze and read the share of the page that is text. It turns "this page feels heavy" into a number you can compare across templates.

It belongs to Kwebby's SEO tools. For the raw HTML and resource counts behind the number, use the Page Size Checker.

Key Features and How It Works

One URL, one click

The input box shows the placeholder "https://example.com". Type or paste a page address and click Analyze, or press Enter. While the tool works, the button reads "Analyzing…" and a spinner shows "Fetching and analyzing page…". A bare domain such as example.org also worked in our test.

Full page or main content

The Measure buttons above the results set what the tool counts. Full page, the default, compares all of the page's HTML with all of its visible text, menus and footer included. Main content only measures one region instead. The tool uses the page's <main> element if it has one, otherwise its <article> elements, otherwise the <body> with the <nav>, <header>, <footer> and <aside> elements removed. The Breakdown panel names the region it used.

Ratio, words and grade

Three cards sit at the top of the results. The first shows the Text Ratio as a percentage, the second the Words count, and the third the Grade. The first and third share a color that moves from green for Excellent to red for Poor.

Size breakdown and bar

Below the cards, a Breakdown panel shows what was measured and lists "HTML Size" and "Text Size" in bytes (B) or kilobytes (KB). In Main content only mode it also shows the full page's HTML size next to the region's. A bar splits the page into Code and Text, so you can see the proportion at a glance. For example.com, the tool reported 577 B of HTML and 171 B of text, a ratio of 30 percent.

Extracted text preview

The Extracted Text Preview shows the opening part of the text the tool counted. Read it to confirm that the tool saw your real content. A short blue note beneath lists the grade bands and explains that the HTML size includes scripts and styles while the text size leaves them out.

Why the Ratio Matters (and Why It Does Not Rank You)

The ratio compares two sizes: the text a visitor can read and the HTML that delivers it. Heavy templates, inline code and long attribute lists add to the second number without adding to the first.

SEO tools have promoted this number for years, so the question is fair: does it affect rankings? Google says no. In 2022 John Mueller described the ratio in a Reddit thread as never having been a factor, and Gary Illyes replied in the same thread that it does not matter and that decent content is what counts. In 2018, Mueller said Google picks up the visible content on a page and treats the amount of HTML as a design choice.

Google's guidance on content points the same way. Its helpful content page asks whether you are writing to a particular word count because you heard Google prefers one, and answers that it does not.

So use the checker for what it measures. It flags template bloat, finds pages that are nearly all markup and shows whether text extraction works at all on a page.

How to Use the Code to Text Ratio Checker

  1. Open the tool and click in the box that shows "https://example.com".
  2. Type or paste the full address of the page you want to test.
  3. Choose Full page or Main content only under Measure.
  4. Click "Analyze", or press Enter. The button reads "Analyzing…" while the page loads.
  5. Read the Text Ratio, Words and Grade cards.
  6. Open the Breakdown panel to compare HTML Size with Text Size.
  7. Scan the Extracted Text Preview and the grade note beneath it.

Best Practices for Reading the Score

Check the preview first

The preview shows what the tool counted. In our test, the preview for a Kwebby page began with the page title and menu items, so navigation text counts as text in Full page mode. Switch to Main content only to leave menus, headers and footers out. If the preview misses text you can see in your browser, compare it with the raw HTML in Get Source Code of Webpage.

Compare like with like

Compare a blog post with another blog post, not with a home page. Templates carry different amounts of markup, so a ratio only means something against pages of the same type.

Fix markup, not word count

If a page scores Poor, look for inline CSS and JavaScript, repeated wrapper elements and unused markup before you add words. Move styles and scripts to external files and remove what you do not use. Google's guidance is to write for readers, so add text only when the page needs it.

Measure speed with a speed tool

HTML weight can affect load time, but the ratio does not measure speed. Run the Page Speed Checker for load metrics and use this tool to find the markup behind a slow template.

Pair it with a content check

A page with few words can score Excellent, as example.com did. Use the Keyword Density Checker and a read-through to judge whether the text itself does its job.

Common Use Cases

  • Template audits. Test one page per template and see which layouts are mostly markup.
  • Thin-page triage. Sort pages with very low word counts for a content review.
  • Migration checks. Run key URLs before and after a redesign to see whether the page got lighter or heavier.
  • Extraction tests. Confirm that text appears in the fetched HTML for pages built with JavaScript frameworks.
  • Client reports. Add the ratio, words and HTML size to an audit as supporting data, with a note that it is not a ranking factor. The Technical SEO Checklist lists the checks that matter more.

Related Kwebby Tools

The Page Size Checker shows the HTML size and the count of external CSS, JS and image files. The Keyword Density Checker analyzes how often terms appear in your text. The Page Speed Checker tests load performance and Core Web Vitals, and Get Source Code of Webpage shows the raw HTML behind any score.

Frequently Asked Questions (FAQs)

What is the code to text ratio?

The code to text ratio is the percentage of a page's HTML that is readable text. Kwebby's checker strips scripts, styles and tags to get the visible text, then divides the text size by the size of the full HTML. A result of 30 percent means about 30 percent of the counted bytes are text.

Is code to text ratio a Google ranking factor?

No. John Mueller said in 2022 that the ratio is not, and never has been, a factor in SEO. Gary Illyes added in the same thread that it does not matter if the page has decent content.

What is a good code to text ratio?

Google sets no target. Kwebby grades 25 percent or more as Excellent, 15 to 25 as Good, 10 to 15 as Average and below 10 as Poor. Treat those bands as a guide to markup weight, not a pass or fail mark.

How do I improve a low code to text ratio?

Remove unused markup, move inline CSS and JavaScript into external files and trim repeated wrapper elements. Add text only if the page needs it. A heavy template can score low even with plenty of copy.

Why is my ratio low when my page has plenty of text?

Markup volume can outweigh the text on pages with large templates or lots of nested elements. In our test, a page with 192 words scored 2 percent. Check the extracted text preview to see what the tool counted.

Is the Code to Text Ratio Checker free?

Yes. Kwebby states that the tool is completely free and needs no account.

Final Thoughts

The Code to Text Ratio Checker gives you a quick read on how much of a page's HTML is readable text. Use it to find heavy templates and pages with almost no copy, and ignore any advice that treats the number as a ranking target. Test your home page, a blog post and a service page today, compare their previews and fix the markup on the heaviest template first.