HTML Lang Attribute Checker

Last updated:

Check the lang attribute on any page in seconds. We read the html element, validate the language tag against BCP 47, report text direction, and flag missing or mismatched values that hurt accessibility and SEO.

Enter a URL to check its lang attribute:

How the Checker Works

  1. Safe fetch, the host is validated before our server requests the page.
  2. Read the html tag, the lang, xml:lang, and dir attributes are extracted.
  3. Validate, the language tag is checked against BCP 47 syntax.
  4. Report, you get the values, the primary language, and any issues.

Why It Matters

  • Accessibility, screen readers pick the right voice and pronunciation.
  • Correct rendering, browsers apply language-specific typography and hyphenation.
  • Translation, tools detect the source language accurately.
  • SEO support, it reinforces page language alongside hreflang.

Next steps

HTML Lang Attribute Checker related tools and articles

Continue with the closest follow-up checks and guides based on this tool's topic, crawl intent, and optimization workflow.

HTML Lang Attribute Checker: FAQ

What is the html lang attribute?
The lang attribute on the html element declares the primary language of a page, for example lang="en" or lang="fr-CA". Browsers, screen readers, search engines, and translation tools all rely on it to handle the page correctly.
What does this checker do?
It fetches your page and reads the lang and xml:lang attributes from the html element, validates the language tag against BCP 47 rules, reports the text direction, and flags missing or mismatched values.
Why does the lang attribute matter for accessibility?
Screen readers use the lang attribute to choose the correct pronunciation and voice. Without it, assistive technology may read content in the wrong accent or language, which is a WCAG 3.1.1 failure.
Does the lang attribute affect SEO?
It is a supporting signal. Search engines mainly infer language from content, but a correct lang attribute reinforces the page language, supports correct rendering, and pairs well with hreflang for international sites.
What is a valid lang value?
Use a primary language subtag like en, plus an optional region like en-US, following BCP 47. Avoid invalid values such as english, a country code alone, or an empty attribute.
What is the difference between lang and xml:lang?
lang is the HTML attribute used by browsers, while xml:lang is the XML equivalent sometimes used in XHTML or polyglot documents. If both are present they should match. This tool checks for mismatches.
Should subpages in another language change lang?
Yes. Each page should declare its own language. A multilingual site should set the correct lang per page or per section, and you can override lang on individual elements for inline foreign-language text.
Is this html lang checker free?
Yes. It is free, requires no signup, and checks any public URL instantly.

Want an Accessible, Search-Ready Site?

We build websites that meet accessibility standards and rank well, with correct language signals baked in.