← All tools

Text to HTML Ratio Checker

Find out what share of your page’s code is text people can read, and what the rest is made of.

What is the text to HTML ratio?

Every web page is a file of code. Part of it is the text people read; the rest is tags, scripts and styles that tell the browser how to show it. The text to HTML ratio is the share of that file taken up by readable text. A page of 100 KB with 15 KB of text has a ratio of 15%.

What the ratio tells you

First and foremost, this ratio is about the quality of a site and of the code it is written in. It shows how much code the site needs to deliver its content. When a page has a lot of code and little text, the site is usually technically more complicated than its content requires, and the code is worth optimising. Lean pages are quicker to download, easier for browsers to draw and simpler to maintain.

The chart in the report shows where the code goes, so you can see what to trim first.

Does it affect rankings?

Not directly. Google has said it does not use this ratio as a ranking signal. What it points to can matter, though: code a page doesn’t need makes it slower, and a page with very little text may have little to offer a reader.

How this test works

Our server downloads your page the way a browser first receives it and reads the code without running any scripts. It removes everything a visitor can’t read, such as tags, scripts, styles and comments, and counts what is left. The first chart shows how the page’s code divides between text and each kind of code. The report adds a second chart of the tags used most, and counts of words, headings, links and images.

What is a good result?

Many SEO tools call 25% to 70% healthy, and our score is built on the lower end of that range. It rises in a straight line with the ratio: a page with no readable text scores 0, a page that is 25% text or more scores 100, and 12.5% scores 50. This range is a convention, not a rule from Google. Some pages are short by design, such as a contact page, and will sit below it; there the thing to look at is what the code is made of, not the percentage.

What this test can’t tell you

If your site builds its content in the browser with JavaScript, the text isn’t in the code we download, so the ratio here will be lower than what visitors see. The test also can’t judge whether the text is any good. A high ratio means a lean page, not a useful one.