What is code-to-text ratio?
Code-to-text ratio compares how much of a page's raw HTML is actual visible text versus markup, scripts, and styling. This tool fetches the page, strips out script and style blocks, measures the remaining visible text, and divides that by the total HTML size. A very low ratio can mean a page is heavy on markup relative to its content - not necessarily a problem on its own, but worth knowing if you're also troubleshooting page speed or wondering why a page "feels" thin on content despite a reasonable word count.
Is this an actual Google ranking factor?
No - code-to-text ratio isn't a confirmed signal Google uses directly in ranking. It's best treated as a rough diagnostic rather than an optimization target: a low ratio sometimes correlates with pages carrying heavy framework overhead, excessive inline styling, or bloated third-party scripts, all of which can independently hurt page speed - and page speed genuinely does factor into ranking and user experience.
Why different tools report different percentages
Different tools make different choices about what counts as "text" (whether to include alt text or hidden elements, for instance) and whether to strip HTML comments - small differences in methodology can shift the reported percentage noticeably between tools checking the exact same page, so use this as a consistent measure over time on your own site rather than comparing the raw number against a different tool's result.
What a low ratio is actually worth investigating
If your ratio seems unusually low, it's worth checking for inline CSS/JS bloat, heavy use of nested wrapper divs from a page builder, or large embedded scripts - these all inflate HTML size without adding content, and trimming them tends to help page load speed more directly than the ratio itself.