100% FREE  -  NO SIGN-UP  -  YOUR FILES NEVER LEAVE YOUR DEVICE

Code to Text Ratio Checker

Paste a page HTML to split it into text and code, get the ratio, and see a tag frequency table that shows where the code weight sits. Nothing is uploaded.

100% free, no premium plan No sign-up Files never leave your device
Drop your text here
or click to choose a file from your device

Your files are processed in your browser, on your own device. Nothing is uploaded to a server.

    Paste a page HTML into this code to text ratio checker and it strips out the scripts, styles, and hidden template content, keeps the visible words, and reports the numbers side by side: total HTML size, text size, code size, the ratio as a percent, and a word count. A tag table shows where the markup weight sits.

    How do you measure a code to text ratio here?

    • Open the page you want to measure, view its source, and copy the full HTML. You can also save the page and drop the file onto this tool.
    • Paste the code into the box above. The measurement runs in your browser straight away.
    • Read the four figures at the top: total HTML size, text size, code size as the difference between the two, and the ratio.
    • Drop down to the tag frequency table. It counts the 15 most used tags in the page, which is usually where bloat hides.
    • Download the extracted text if you want the clean words on their own, or grab the text report with all the figures recorded.

    Nothing is uploaded during any of this. The page you paste can be a live article, a staging build, or a template file from a project that has not launched.

    What does the code to text ratio actually mean?

    The definition used here is printed in full so the number can be checked: ratio means text bytes divided by total HTML bytes, times 100, measured on the HTML exactly as pasted. Before measuring, the tool removes script, style, noscript, and template content, since none of that is visible reading matter. What remains in the body counts as text.

    A worked example makes the figure concrete. A page of 80 KB where the visible words weigh 12 KB has a ratio of 15 percent. The other 68 KB is markup, structure, attributes, and inline code. That split is normal for a modern CMS page, which is why the raw percent needs context before it needs worry.

    The tag frequency table gives that context. A page with thousands of div and span tags and a thin paragraph count is carrying template weight. A page where the article text dominates reads very differently, even at a similar ratio.

    Why do code to text ratio figures disagree between tools?

    Because every tool draws the lines somewhere else. One counts the words inside navigation menus as text, another strips them. One measures characters, another measures bytes, and multibyte characters weigh differently under each rule. One fetches the page from a server and gets the compressed response, another works from the source you saved.

    The honest response is to compare like with like. A figure from this tool should only be compared with other figures from this tool, measured the same way on the same kind of paste. Treat any cross tool comparison as two different metrics wearing the same name. The same caution applies to the bands quoted around the web. Under 10 percent is often called thin, and 25 to 70 percent is often called healthy, but those bands are folklore passed between blogs. They are not a Google threshold, and no ranking system has published them.

    What are the limits of a pasted ratio check?

    The ratio is not a ranking factor. A well known crawler vendor states this plainly in its own documentation, and Google has never suggested otherwise. A low ratio is a symptom worth a look, since it often means heavy templates or thin content, but fixing the number itself wins nothing.

    A paste has two more limits worth knowing. Text that a script adds after the page loads is not in the source, so it is not counted, which means script heavy pages can look thinner here than they feel to a reader. And the measurement says nothing about the live response at all: no HTTP status, no headers, no redirects, and no load speed. What it measures, it measures exactly, on the bytes you provided.

    FAQs

    What is a good code to text ratio?

    There is no official good figure. Blogs often quote 25 to 70 percent as healthy and under 10 percent as thin, but those bands are folklore rather than a published threshold. Use the number to spot bloat, not as a target.

    Is code to text ratio a ranking factor?

    No. Crawler vendors and Google guidance agree that search engines do not rank pages by this ratio. It is a diagnostic that can point at heavy templates or thin content, nothing more.

    Why is my ratio lower here than on another tool?

    Different tools count differently. Some include menu text, some measure characters instead of bytes, and some fetch a compressed response. Only compare figures produced by the same tool the same way.

    Does the checker count text inside menus and footers?

    Yes. Visible body text counts, including navigation and footer words, once scripts, styles, and template blocks are removed. The word count and the tag table help you judge how much of the text is the actual article.

    Why does my page show less text than I expected?

    Words added by JavaScript after load are not in the HTML source, so they cannot be counted from a paste. Pages that render content in the browser will always look lighter here than they look on screen.

    Can I download the text of a page?

    Yes. The tool offers the extracted visible text as a download, alongside a text report holding the sizes, the ratio, and the tag counts.

    More SEO Tools

    Same rules as this one: free, in your browser, with nothing uploaded.

    Scroll to Top