Skip to content
MrKeyword

Hreflang tag checker: validate pasted hreflang tags

Paste hreflang link tags or a small HTML snippet. The checker reads them in your browser and reports invalid language-region codes, a missing self-reference, duplicate alternates and whether an x-default is present. Nothing is sent to MrKeyword.

Check pasted hreflang tags

Paste the tags from one page. The checker reads them in your browser and never sends the markup anywhere.

Your result

Paste your tags to see the result.

What does this hreflang tag checker do?

A hreflang tag checker reads the hreflang link tags you paste and tells you whether the language-region codes are valid, whether the page lists itself, whether a code or URL is repeated, and whether an x-default is present. It checks the markup only; it cannot open the other URLs or confirm that they link back.

hreflang tells Google which language or regional version of a page to show. Google only trusts a set when every page lists itself and every other version, the codes are real ISO codes, and the URLs are the final addresses. A pasted snippet shows one page's side of that set, so use the URL-based hreflang checker when you need to confirm return links on the live pages.

What the checker reports

Each row shows the parsed URL and the language or region it names. A row is marked OK when the code is valid, the URL is absolute and the code and URL are not repeated.

The findings above the table list invalid codes such as en-UK (use en-GB), a missing self-reference, duplicate codes, one URL used for two codes, relative URLs and a missing x-default. A missing x-default is a recommendation, not a hard error.

What pasted markup cannot confirm

Pasted markup cannot confirm reciprocal tags on other URLs. The checker sees only the tags you paste, so it cannot know whether the French page links back to the English page, whether an alternate redirects, or whether another version is noindex. Those checks need a live fetch of each URL.

A clean result is not proof that Google indexed or accepted the annotations. Google may ignore hreflang for reasons outside the snippet, including a canonical that points at another language version, a page that is not indexed, or a return link that is missing on the other side. Confirm important pages in Search Console and with the URL-based checker.

How to check hreflang tags

1. Copy the hreflang link tags from the page head, or paste a small HTML snippet that contains them.

2. Add the page URL if you want the self-reference checked. If you leave it empty, the checker uses a canonical link in the snippet when one is present.

3. Press Check hreflang tags. The table shows each parsed URL and language, and the findings list what to fix.

4. Fix the markup, then check the live page with the hreflang checker to confirm return links and status codes.

Common hreflang mistakes

en-UK instead of en-GB. UK is not an ISO 3166-1 region code; the United Kingdom is GB.

A country code used as a language. jp is not a language; Japanese is ja or ja-JP.

No self-reference. Every page in the set should list itself as well as the other versions.

Duplicate codes. Each language-region code should point to one URL only.

Relative URLs. hreflang needs the full address, such as https://example.com/fr/, not /fr/.

FAQs

What does a hreflang tag checker check?

It checks the hreflang link tags you paste: whether each language-region code is valid, whether the page lists itself, whether a code or URL is repeated, whether the URLs are absolute, and whether an x-default is present. It does not fetch the other URLs.

Can pasted markup confirm reciprocal tags on other URLs?

No. The checker sees only the tags you paste, so it cannot confirm that another language version links back, returns a 200 status, or has a self-referencing canonical. Use the URL-based hreflang checker for those live checks.

What is a self-reference in hreflang?

A self-reference is a tag on the page that points to the page's own URL with its own language-region code. Every page in a hreflang set should include one, alongside tags for the other versions.

Do I need an x-default tag?

x-default is optional but recommended. It names the page to show visitors whose language or region is not listed, usually a language picker or the main version. The checker reports when it is missing but does not treat that as a hard error.

Does this tool prove Google indexed or accepted my hreflang?

No. It checks the markup you paste, not Google's index. Google may ignore hreflang because of a missing return link, a canonical pointing at another language version, a noindex page or another issue outside the snippet. Confirm important pages in Search Console.

Is my pasted data sent anywhere?

No. The parsing and checks run in your browser and make no network request. The markup never leaves the page, and no account is needed.

Go further