Making It Your Web

Text To Code Ratio

  • Created 19th May 2009 @ 10:29:22
  • Last update 28th Jan 2014 @ 17:30:44
  • By Alex Hall

It is important to build optimised web sites, not just on the back end, but on the front end too. This tool will tell you how much code you are using compared to the amount of content that is on your page.

A lot of search engines such as Google base their search results upon relevancy to the content provided. I a page isn't relevant, it won't appear in the search engine results pages (SERPs) as high as a page that is.

If your web page contains too much code, such as HTML, this could prevent a search engine spider from crawling the page in its entirety. Search engine crawlers these days have become much more advanced and are able to check the amount of code there is on a page and compare it to the amount of text as part of its algorithm. If the page is too big, the spider may only capture portions of the page, leaving out possible vital and relevant content.

Type the full URL (including 'http://') of the domain into the form below and we'll run a quick check to see what your text to code ratio is. Please note the percentage you see if the percentage of text to code... if you want to find out the code to text ratio to subtract the text ratio from 100(%).

If you're looking to see the text-to-code ratio of a local file just put the contents in the following box and we'll check it that way instead.

Your output will appear here.

What do these ratios mean??

Basically, the higher the percentage, the better. Up to a certain point that is. If you've got higher than about 70% or so then you've got a lot of text and not a lot of code, which might sound like a good thing, but could represent spam too. We have added a traffic light colour scheme to the result of your checked page, Red, Amber and Green.

  • Red: 0% - 10%
  • Amber: 11% to 24% (and 70% +)
  • Green: 25% and over and your page is BLOAT FREE and will work well in the SERP's.

Text To Code Ratio Firefox Extension

I have written this tool as an extension to Firefox that you can download here and it will sit in your statusbar (at the bottom right) and each time you load a new page/switch to a new tab it will run in the background and display the text to code ratio for the given current web site.

If you have any comments or would like to leave feedback you can either comment on the add-on page, or leave a comment here and let me know what you think, or what you feel could be improved. I hope you enjoy using this tool as part of your browsing experience with Firefox!

Comments (4)

Nice Tool by Tiji

on 15th May 2014 @ 13:51:18

I must say that the Text to Code ratio checker is an amazing tool. Its fast too .

12 30


Error with local file. by Karin Mäsel

on 6th Jul 2015 @ 12:45:49

Hi Alex,

the tool works fine with a domain, but when I run the tool with a local file, an error message "No domain specified, or invalid domain" is shown and no text to code ratio is displayed.

It would be great, if I could although test a local file.

0 0


Hi Karin by Alex Hall (author)

on 25th Sep 2015 @ 13:23:52

The reason why it doesn't work on local domains is because I use a script to parse the document on my server as it parses it in PHP.

My server won't have access to your localhost so the ratio checker won't work. I have an online version above though for you to check your code.

0 0


Alarmanlagen EiMSIG - Text To Code Ratio by Zeljko Crepulja

on 3rd Oct 2017 @ 01:16:59

Hello Alex,

you make a great tool. I search longer for so a tool for verifying from Text To Code Ratio at our website: Now, we know about working on pur website.

Thank you.

0 0


Add A Comment

Please note: all comments are moderated before they are published on this page.

Cancel Reply