Entrez une URL
Open any webpage. What do you actually see? A headline, some paragraphs, maybe an image. But behind the scenes, there's HTML, CSS, JavaScript, tracking pixels, analytics scripts, and dozens of lines of code.
The Code to Text Ratio tells you: of the total page size, how much is visible text that a human would read? The rest is code, markup, and hidden elements.
Our tool calculates this ratio instantly. Enter a URL. Get the percentage of text versus code. No tables, no clutter – just the number and what it means for your SEO.
It's a simple formula:
(Visible Text Size) ÷ (Total Page Size) × 100
If your page is 100KB total, and the visible text is 20KB, your ratio is 20%.
Search engines like Google want to see pages with a healthy amount of actual content – not just code and navigation menus. A very low ratio (under 10%) suggests the page is mostly code, which can hurt rankings. A very high ratio (over 50%) is rare and usually indicates a text‑heavy page with minimal formatting.
Content writers – You wrote a 2000‑word article. But after publishing, the page might be bloated with sidebar widgets, related posts, and ads. Run the URL. If the ratio is low, your valuable content is being drowned out.
SEO specialists – A client's page isn't ranking. You check backlinks, keywords, meta tags – all fine. Then you check code to text ratio. It's 8%. That's the problem. Recommend stripping unnecessary code.
Web developers – You built a custom theme. It looks great, but is it efficient? Check the ratio. If it's under 15%, your HTML is probably too heavy. Minify, remove inline styles, move scripts to external files.
Agency owners – Before sending a client report, run their key pages through the checker. A low ratio is an easy win. "We found your page is 80% code and only 20% content. Let us clean it up."
We fetch the full HTML of your URL. Then we strip out:
<div>, <span>, <p>, etc.)<!-- -->)display:none or visibility:hidden)What remains is the visible text – the words a human sees on screen. We compare the size of that text (in bytes) to the total page size (HTML only, not including images or external files). The result is your code to text ratio.
Step 1 – Open the Code to Text Ratio Checker on bingowebrabbit.com.
Step 2 – Enter a URL. Example: https://bingowebrabbit.com/page-speed-checker
Step 3 – Click "Check Ratio".
Step 4 – You'll see a result like: Code to Text Ratio: 24%
That's it. No tables, no extra columns. Just the percentage and a brief recommendation.
Less than 10% – Critical
Your page is drowning in code. Common causes: heavy themes, excessive inline styles, huge JavaScript blocks embedded directly in the HTML, or dozens of tracking scripts. Search engines see very little content. You need a major cleanup.
10% – 15% – Poor
Still too low. The page has content, but it's buried. Look for redundant HTML, nested divs, or oversized navigation menus. Consider moving to a leaner template.
15% – 25% – Average
Most normal webpages fall here. Not great, not terrible. You could improve, but it's not urgent.
25% – 40% – Good
Your page has a healthy balance. Content is clearly visible. Code is reasonable. This is where you want to be.
Over 40% – Excellent
Rare. Usually means a very text‑heavy page (like a long article or documentation) with minimal formatting. You're doing great.
style="color:red;") bloats the page.<!-- like this --> count as code, not text.Use external CSS and JS – Move all styles and scripts to external files. The tool measures only the HTML itself, so external files don't hurt your ratio.
Remove unnecessary divs – Each <div> adds code. Flatten your HTML structure where possible.
Delete unused widgets – If your sidebar has a "recent comments" widget that never gets comments, remove it. Less code, cleaner page.
Write longer content – The simplest fix: add more visible text. Expand your product descriptions, add FAQs, write detailed introductions. More text naturally improves the ratio.
Switch to a lean theme – Some WordPress themes are lighter than others. GeneratePress, Astra, or custom coded themes often have much better ratios than heavy multipurpose themes.
Minify HTML – Remove whitespace, line breaks, and comments from your HTML. This reduces total page size, which increases the ratio (since visible text stays the same). Many caching plugins offer minification.
A typical blog post using a lightweight theme: 28% ratio. Good.
A landing page built with a drag‑drop builder: 11% ratio. Poor. The builder added 89KB of code for every 11KB of text.
A plain HTML page with a 5000‑word article and no CSS: 72% ratio. Excellent, but rare.
An ecommerce product page with heavy tracking scripts embedded: 9% ratio. Critical. The tracking code alone added 40KB.
"Images are counted as code" – No. Images (JPEG, PNG) are external files. Our tool only measures the HTML. Image <img> tags do count as code (a few bytes each), but the image file itself does not.
"Google directly uses this ratio as a ranking factor" – Not exactly. Google doesn't have a "code to text ratio" score. But Google does prefer pages that load quickly and contain substantial content. A low ratio often correlates with slow loading and thin content – both of which hurt rankings.
"A higher ratio is always better" – Not if you achieve it by removing necessary code. If you strip out structured data, accessibility labels, or responsive design elements just to raise the ratio, that's a bad trade‑off. Aim for balance.
Does this work for pages that load content with JavaScript?
No. We only see the initial HTML. If your content is added via AJAX or React after page load, our tool won't see it. Use our "Render Page" tool for JavaScript‑heavy sites.
What about pages with login or paywalls?
We see what a logged‑out visitor sees. If content is hidden behind a login, it's not visible text – it won't count.
Is there a perfect ratio?
No single number works for every page. A documentation page might have 45% and that's fine. A gallery page with mostly images might have 12% and that's also fine. Use the ratio as one signal among many.
How often should I check?
Every time you make major changes to a page template or content. Also check periodically – plugins or updates can add hidden code without you noticing.
Is the tool free?
Yes. No signup, no limits for normal use.
Code to text ratio isn't a magic SEO bullet. But it's a useful health check. A page with 8% ratio is hiding its content under layers of code. A page with 28% ratio is clean and readable.
Our tool gives you the number. No tables, no complexity. Just enter a URL and get your percentage.
Try it now on bingowebrabbit.com. See how your pages measure up. If the number is low, you know what to fix.