Hreflang Validator
A hreflang validator checks the language and region annotations that tell Google which version of a page to serve to which audience, catching the small syntax mistakes that quietly break an entire international setup. A single invalid region code, a missing self-reference, or a duplicated language tag is enough for the search engine to ignore the signal, so the wrong-language page surfaces in results and click-through quietly drops.
This free, browser-based tool parses pasted <link rel="alternate"> tags or XML sitemap <xhtml:link> entries, lists every hreflang-to-URL pair, and flags malformed codes, duplicates, a missing x-default, and a missing self-reference. It runs entirely client-side, so nothing pasted into it is ever uploaded.
🔒 Private: everything runs in your browser. Nothing you paste is uploaded.
How to validate hreflang annotations
Paste your hreflang tags in either format, optionally add the page’s own URL to check the self-reference, and read the flags. The tool validates every code against the same language-region rules Google applies.
Check the language and region codes first
Every hreflang value must be a valid ISO 639-1 language code, optionally followed by an ISO 3166-1 Alpha-2 region, joined by a hyphen, such as en, fr-CA, or pt-BR. The most common breakage is a region code that looks right but is not standard: en-UK is invalid because the United Kingdom is GB, and en-EU fails because the European Union is not a country. The validator parses each subtag, confirms the language exists, confirms the region is a real ISO country, and marks anything Google would silently discard so the typo is fixed before it ships.
Confirm x-default and the self-reference are present
Two structural pieces are easy to forget and both matter. The x-default tag tells Google which URL to serve when no listed language or region matches the user, and it should point at a language selector or your primary market. The self-reference is the rule that every page in an hreflang set must list itself among its alternates. Paste the page’s own URL into the Self URL field and the tool confirms one tag points back to it exactly, matching scheme, host, and path. A set missing either piece is incomplete, and Google may treat the whole cluster as unreliable.
Verify return tags separately, because no parser can
hreflang is reciprocal: if the English page points to the German page, the German page must point back to the English one, or Google drops the unconfirmed pairing. This is the single hardest rule to satisfy at scale and the one a paste-based tool cannot confirm, because verifying it means reading the live tags on every target URL. This validator deliberately does not fetch anything, so it flags return-tag reciprocity as a manual check rather than faking a result. Inspect each listed URL’s own tags, or use Search Console’s International Targeting report, to close the loop.
Hreflang validator frequently asked questions
Q1What makes an hreflang code invalid?
An hreflang value must be a valid ISO 639-1 language, optionally with an ISO 3166-1 Alpha-2 region after a hyphen. The frequent failures are non-standard regions like en-UK, which should be en-GB, en-EU, which is not a country, an underscore instead of a hyphen, or a language code that does not exist. Google silently ignores any tag it cannot parse, so the affected pages simply get no hreflang signal at all.
Q2Do I really need an x-default tag?
It is technically optional but strongly recommended. The x-default tag tells Google which page to serve when a user’s language and region match none of your listed versions, which is common for international traffic. Without it, the search engine guesses, and the guess is often a market-specific page shown to the wrong audience. Point x-default at a language selector or your primary-market homepage to cover everyone you have not explicitly targeted.
Q3What is the self-reference rule?
Every page in an hreflang set must include a tag pointing to itself among its alternates. If the English page lists French and German versions but omits its own English URL, the set is incomplete and Google may distrust it. The self-referencing URL has to match exactly, including scheme, host, and path. Enter the page’s own URL in the tool’s Self URL field and it confirms whether one of your tags points back correctly.
Q4Can this tool check return tags automatically?
No, and any tool that claims to do it from pasted markup alone is guessing. Return-tag reciprocity means every page you reference must point back to the page it came from, which can only be confirmed by reading the live tags on each target URL. This validator runs entirely in your browser and never fetches external pages, so it flags reciprocity as a manual check instead of inventing a result it cannot actually verify.
Q5Is my pasted data sent anywhere?
No. The entire validator runs as client-side JavaScript inside your browser, parsing and checking the tags locally. Nothing you paste into the input, including URLs and any internal staging hostnames, is uploaded, logged, or stored on a server. The tool keeps working even if you go offline after the page loads, which makes it safe to check unpublished or confidential page templates.
