Rankite
ServicesResultsToolsTeamAboutBlogCareersContactFree SEO Audit
Free tool

Text to HTML Ratio Checker

Paste your page's HTML source to see what share of it is visible, readable text versus tags, scripts and styles, calculated instantly in your browser.

Home / Tools / Text to HTML Ratio Checker
Text to HTML ratio
-
Total HTML size
-
Visible text size
-

Built by Rankite, the SEO team behind Swordfish AI's +400% revenue and Zluri's +45% organic growth. See the case studies

Text to HTML ratio compares how much of a page's code is visible, readable content against how much is markup, scripts and styles. It has been a staple of technical SEO audits for years, mostly as a quick way to spot pages that are mostly code and very little substance. Paste your page's HTML source above and this checker calculates the ratio in your browser, nothing is uploaded anywhere.

How the ratio is calculated

The checker first removes anything inside script and style tags along with HTML comments, since none of that is content a visitor reads. It then strips every remaining tag to isolate the visible text, collapses extra whitespace, and measures that text's length against the length of the full HTML you pasted. Divide the visible text length by the total HTML length and multiply by 100 to get the percentage. A page with 5,000 characters of total code and 1,000 characters of visible text comes out to a 20 percent ratio.

Is text to HTML ratio a ranking factor

No, and it is worth being direct about that. Google has never confirmed this ratio as something it scores directly, and there is no solid public evidence that it independently affects rankings. It survives as a diagnostic mainly because a very low ratio tends to correlate with real problems, bloated framework markup, oversized inline scripts, or pages that genuinely do not have much to say, and those underlying problems can matter even if the ratio itself does not.

What to actually do with a low ratio

Treat a low number as a prompt to look closer, not a target to hit. If your content is thin, the fix is writing more useful, specific content, not padding the page to move a percentage. If your content is substantial but the ratio is still low, the more likely culprit is heavy inline scripts or styles that could be moved to external files, or verbose markup from a page builder, both of which are worth trimming for page speed regardless of what this ratio says. Pages built heavily with client side JavaScript will also show an artificially low ratio here, since this checker reads the raw source and cannot execute scripts to see the text they render afterward.

A clean ratio never rescues thin content, and thin content is what actually holds pages back in search. Request a free SEO audit and we will show you where your content needs real substance, not just a smaller script tag.

Related articles

FAQ

Text to HTML Ratio Checker: questions, answered

What is text to HTML ratio?
Text to HTML ratio is the percentage of a page's size made up of visible, readable text compared to its total HTML code, including tags, scripts and styles. A page with 5,000 characters of HTML and 1,000 characters of visible text has a 20 percent ratio.
How is text to HTML ratio calculated here?
The checker strips out script and style blocks along with HTML comments, then removes all remaining tags to isolate the visible text. It divides the length of that visible text by the length of the full HTML you pasted, then multiplies by 100.
Is text to HTML ratio a Google ranking factor?
No. Google has never confirmed text to HTML ratio as a ranking factor, and there is no solid public evidence that it is one. It is a long standing technical SEO heuristic that some tools still report because a very low ratio often correlates with other real issues, like bloated code or thin content, not because the ratio itself is scored directly.
Why would a page have a low ratio?
Heavy inline scripts and styles, verbose framework generated markup, large embedded widgets, and genuinely thin written content all push the ratio down. A page built with a lot of client side JavaScript can also show a low ratio here because the visible text only appears after the script runs, which this static checker cannot render.
What should I actually do with this number?
Use it as a rough diagnostic, not a target to hit. If the ratio is unusually low, check whether it is because of genuinely thin content, which is worth fixing, or bloated code that could be trimmed for page speed. If your content is substantial and your code is reasonably clean, a lower ratio on its own is not something to chase.

More free tools

Let's grow

Ready to own page one?

Get a free, no-obligation SEO audit and a 30-minute strategy session. We'll show you exactly where the growth is hiding.

Book your free audit Explore services
Get in touch

Tell us about your project

Fill out the form and we'll get back to you within one business day. Prefer email? Write to us directly at contact@rankite.com.

Or copy our email and write to us directly: contact@rankite.com