free web tracker
Code to Text Ratio Checker

Code to Text Ratio Checker

See how much of your page is real content and how much is code. Enter a URL to get your code to text ratio, with the text size and total page size in bytes.

  • 100% Free
  • No Registration
  • Accurate Results
  • Fast & Secure


Code to Text Ratio Checker

Every webpage is a mix of visible text and the code that shapes it. The visible text is what readers see and what search engines rank. The code is the HTML, inline styles, and scripts that hold the page together. The Code to Text Ratio Checker measures the balance between the two: it fetches a page, compares the size of the visible text with the total size of the page, and reports the result as a percentage, along with both sizes in bytes. A high ratio means the page is mostly content. A low ratio means the page carries a lot of code for relatively little text.

What the Ratio Measures

The tool measures two sizes. The text size is the visible text on the page, counted in bytes. The total size is the whole page as downloaded, including all markup, inline styles, and scripts. The ratio is the text size divided by the total size, shown as a percentage. A page with 10,000 bytes of text in a 50,000 byte page has a ratio of 20 percent. The same text in a 20,000 byte page would give 50 percent.

The ratio is a rough signal, not a precise score. Different tools count text and code in slightly different ways, so the exact number matters less than the picture it gives: how much of the page is content, and how much is scaffolding around it.

How to Read Your Result

No authority publishes a target number for this ratio, and it has never been confirmed as a ranking factor, so chasing one specific number is a mistake. Content-rich pages often sit somewhere between 20 and 70 percent, as a rough guide. A ratio near the top of that range usually means a clean page with plenty of text. A ratio below 10 percent usually means the page carries heavy code for very little visible content, which is worth investigating even though the ratio itself is not a ranking factor.

Context matters more than the number. A product page with a short description and a large image gallery will naturally show a low ratio, and that is fine. A long article with a low ratio is a different story: the text is there, but it is buried under code that adds nothing for the reader.

Why a Low Ratio Is Worth Investigating

A low ratio rarely causes a problem by itself, but it often points to real ones. Bloated code slows the page down, and slow pages lose visitors and rank worse. Inline styles, unused scripts, and deeply nested markup all add bytes that the browser must download and process. Thin content is the other side of the same coin: a page with little text gives search engines little to rank, whatever the code looks like. The ratio is a warning sign that one of these problems may be present.

  • Heavy inline styles repeated across the page instead of a shared stylesheet
  • Scripts loaded on every page even when only one page uses them
  • Deeply nested markup from a page builder or an old template
  • Very little visible text relative to the size of the page

Practical Ways to Improve the Ratio

The most direct fix is to add more useful text. A longer, better article raises the text size and improves the page for readers at the same time, which is a better trade than trimming code alone. On the code side, move inline styles and scripts into external files, remove code the page no longer uses, and simplify markup where a page builder has added layers of empty containers.

After making changes, run the checker again and compare the ratio with the earlier result. A meaningful improvement shows up as a higher percentage and a smaller total page size. If the ratio barely moves, the remaining code may be coming from the template or the platform itself, in which case the fix belongs at the theme level rather than on one page.

Improve Your Website's SEO Today

Use our free SEO tools to analyze, fix and grow your website.

Explore All Tools

Frequently Asked Questions

Enter a webpage URL and run the tool. It fetches the page, measures the size of the visible text against the total size of the page, and reports the result as a percentage, along with both sizes in bytes.

There is no official target, and Google has never confirmed the ratio as a ranking factor. As a rough guide, content-rich pages often land between 20 and 70 percent, while very low ratios usually mean the page carries a lot of code for little text.

Add more useful text content to the page, and trim code that adds nothing, such as inline styles, unused scripts, and deeply nested markup. Moving CSS and JavaScript into external files also reduces the code on the page itself.

Not directly, but a low ratio often points to real problems: bloated code slows the page down, and thin content gives search engines little to rank. Treat the ratio as a warning sign, not a score to chase.