Skip to main content
SEO Auditor — fetches the audited page, measures the visible text against the full HTML and judges the ratio: more than 20% is healthy, 10–20% warns, 10% or less fails.

Content first

A page that is mostly markup gives search engines little to index and rank; a lean page puts its copy forward.

Lighter pages

Inline scripts, styles and wrapper markup are downloaded by every visitor but carry no message.
The text to HTML ratio compares the characters of visible text on a page with the characters of HTML it took to deliver them. Search engines index the text, not the markup, so a page where code outweighs copy gives them less to rank the page on, and every visitor downloads that code before reading anything. This auditor measures the ratio of the audited URL from the server’s HTML (what a crawler receives on the first request) and compares it with the 10% and 20% thresholds that SEO tools commonly use.

How it works

  1. Fetch — sends a GET to the audited URL as 37AuditsBot. A blocked request ends the audit with 590; any other failure (timeout, DNS, TLS, non-2xx answer) ends it with 500.
  2. Parse — parses the HTML with jsoup and reads the normalized text of <body> (the whole document when there is no body). Scripts, styles, comments, <noscript> and <template> content are markup, not text.
  3. Measure — counts the characters of that text and the characters of the raw HTML; the ratio is text divided by HTML (an empty document counts as 0%).
  4. Rules — a ratio of 10% or less fails (400); a ratio above 10% but not above 20% warns (300).
  5. Aggregate — FAIL wins over WARNING; a ratio above 20% is SUCCESS (200). Every check carries htmlLength, textLength, ratio (4 decimals), healthyThreshold (0.20) and moderateThreshold (0.10) in its data.

What it audits

Every row maps to one checkRule* method and one CheckCode, in the order the auditor runs them. CheckCode suffixes use status ranges: 200 success, 300–399 warning, 400–499 fail, 500–599 error.

Output documentation

Risks and considerations

What the ratio does and does not say

  • There is no ratio that search engines require; the 10% and 20% thresholds are the ranges SEO tools commonly use. A low ratio is a signal to look at the page weight and the amount of real copy, not a penalty in itself.
  • Pages that are legitimately light on text (a login form, a search page, a photo gallery, an application shell) will score low. Judge them by what the page is for.

Server-rendered HTML only

  • The auditor reads the HTML the server sends, not the page after JavaScript runs. A single-page application that renders its content in the browser serves almost no text in the HTML and fails, which is also what a crawler that does not execute JavaScript sees. Server-side rendering or pre-rendering fixes both.
  • Text inside <noscript>, HTML comments and <template> elements is not counted as visible text.

How the text is measured

  • The visible text is the normalized text of <body> as jsoup reads it: whitespace is collapsed, and scripts, styles and comments are excluded. Earlier versions of this auditor stripped tags with regular expressions, which counted comments and <noscript> content as text; the verdict thresholds are unchanged.
  • Lengths are counted in characters, not bytes, and the ratio is reported with four decimals in the check data.

What this auditor does not check

  • Only the audited URL is measured; other pages of the site may differ widely.
  • The quality or relevance of the text is not judged, only its share of the HTML.