Hreflang Tag Validator

Paste the hreflang tags from your HTML to automatically detect common multilingual SEO mistakes: missing x-default, missing self-reference, invalid language codes, and duplicate declarations.

Validating hreflang on a multilingual site

Hreflang is the declaration that tells search engines a page has counterparts in other languages. Paste in the `` tags from your `` and this tool surfaces the configuration mistakes that recur on multilingual sites: a missing `x-default`, an absent self-reference, an invalid language code and duplicate declarations.

**What is most often misunderstood about hreflang is that the references must be reciprocal or they count for nothing.** A Japanese page may point at its English counterpart, but **unless the English page points back, the declaration is disregarded.** A self-reference pointing at the page itself is required too, and a set lacking it is likewise void. The other frequent error concerns the code: the value of `hreflang` takes an ISO 639-1 language code first, optionally followed by an ISO 3166-1 region code. **Writing `en-UK` for the United Kingdom is wrong; the correct form is `en-GB`.** Nor may a region code stand on its own, since `uk`, for instance, denotes Ukrainian rather than anything British.

How to use it

  1. Paste the HTML containing your hreflang tags The contents of `` can go in exactly as they stand.
  2. Give the URL of the page under test, if you like **Supplying it lets the tool confirm the self-reference as well.**
  3. Read the points raised Invalid codes, duplicates and a missing `x-default` are all reported.
  4. Check the counterpart pages the same way **Reciprocity cannot be established from one side alone.** Run the same check on the pages being pointed at.

Tips for getting more out of it

  • Hreflang tags should be reciprocal across all language variants. This tool only checks the "self-reference" from a single page's tags, so also verify the cross-links between all your language pages manually.
  • The language code check covers roughly 40 common languages and 50 region codes only. If you use a less common language or region, cross-check it against the official ISO 639-1 and ISO 3166-1 lists.
  • Google Search Console's "International Targeting" report shows actual hreflang errors Google encountered while crawling your site — use it together with this tool for extra confidence.
  • If your hreflang annotations live in sitemap.xml as elements instead of tags, extract just those link elements before pasting them here.
  • x-default isn't strictly required, but setting it on a language-selector page or your most general-purpose language version protects visitors from countries you haven't explicitly targeted.

Where it comes in useful

Launching a multilingual site

You can confirm before release that the declarations are complete.

Adding a single new language

**Every existing page needs a line for the new language too, which makes omissions easy.**

Investigating why the wrong language appears

When search results show an unintended version, a fault in hreflang is the first suspect.

Inspecting what a template emits

You can confirm that automatically generated declarations really do vary correctly from page to page.

Hreflang terms

Hreflang
The attribute stating which language and region a URL is meant for. **Its value takes the language code first, with an optional region code after it.**
Self-reference
The hreflang line pointing at the page itself. **Without it the whole set is void.**
Reciprocal reference
The state of two pages pointing at each other. **A declaration running in one direction only is disregarded by search engines.**
X-default
Names the page to show a visitor whom none of the languages fits. A language-selection page or the default version serves the purpose.
ISO 639-1
The standard for two-letter language codes such as `ja`, `en` and `zh`.
ISO 3166-1
The standard for two-letter country and region codes such as `JP`, `GB` and `US`. **The United Kingdom is `GB`, not `UK`.**

Frequently Asked Questions

Only pages that have equivalent content available in other languages or regions need them. A single-language site, or pages whose content differs substantially between languages, don't need hreflang at all — limit it to pages that are genuine translations of one another.

It's a special value that points to a fallback page shown to users whose language doesn't match any of your hreflang entries (for example, a browser set to Spanish when you have no Spanish version). It's not required, but it's commonly set on a language-selector page or your most general-purpose language version.

It means a page's own hreflang tags include an entry pointing back to itself, not just to its other language variants. For example, an English page should list hreflang="en" pointing to itself in addition to entries for its Japanese or French versions — this is an explicit requirement in Google's official documentation.

Yes, and in fact this is the standard combination for multilingual sites: each language page should have a canonical tag pointing to itself (never to another language's URL), alongside hreflang tags listing all the language variants.

Hreflang itself is not a ranking factor. What it does is make sure the right audience sees the right language version, which can improve click-through rate and engagement — and those improvements may indirectly benefit your site's overall performance in search.
Tool-kun

Side Note — Why hreflang so often seems to "not work"

The hreflang attribute was introduced by Google in 2011 as a way to signal, for a set of pages that share the same content in different languages or regions, which URL should be shown to which searcher. Unlike a canonical tag, which folds duplicate URLs into a single preferred one, hreflang treats each language variant as an equal sibling page — get it right, and a Japanese searcher sees your Japanese page while an English searcher sees your English page in the results.

What makes hreflang unusually tricky compared to most other SEO signals is that mistakes rarely produce a visible error. A missing reciprocal link, a missing self-reference, or a mistyped language code all look completely normal in a browser — the only symptom is that the wrong page quietly shows up in search results for the wrong audience, something you'd only notice by actively checking Search Console's reports.

A site like this one, which serves content in eight languages, depends on consistent hreflang wiring across every page to capture search traffic properly. As the number of pages grows, keeping tags accurate by hand becomes increasingly error-prone, which is exactly the kind of tedious-but-effective check a tool like this is meant to automate before publishing.