WEBMASTER TOOLS

Hreflang Validator

Check pasted HTML alternate links or XML sitemap hreflang entries for language tags, URL issues, self-references and reciprocal links.

LOCAL SOURCE CHECK

Validate hreflang markup

No pages crawled

Used only when the pasted HTML has no canonical link. Multiple pages should each include a canonical URL.

Paste source only; one or more HTML head blocks or a sitemap with xhtml:link entries. No linked pages are fetched.

Validation summary

page(s) · alternate link(s) · error(s) · warning(s)

Reciprocal-link matrix

Your pasted HTML or sitemap stays in this browser. This is a source-level check, not a live crawl.

Hreflang validation guide

Use HTML mode for one page or multiple pasted <head> blocks. Use sitemap mode for an XML sitemap containing <xhtml:link rel="alternate"> entries. For a single HTML snippet without a canonical tag, supply its page URL above.

What the checks cover

The validator checks BCP 47 language-region tags (including the special x-default value), duplicate hreflang values, absolute HTTP/HTTPS target URLs and whether each page links to itself. When multiple page blocks are included, it checks reciprocal references for targets that are also present in the pasted set. Other targets are labelled unverified rather than treated as failures.

It does not fetch the target pages, verify status codes, inspect rendered JavaScript or prove that the live site serves the pasted source. Compare the report with deployed HTML and the current sitemap when investigating production issues.

Frequently asked questions

What can I paste into the validator?

Choose HTML page(s) to validate one page head or multiple pasted head blocks, or choose XML sitemap to inspect <url> entries and their xhtml:link alternates. A page URL field is available when an HTML snippet has no canonical link.

What does the reciprocal-link check mean?

When several page blocks are supplied, the validator checks whether a referenced page has an alternate link back to the source page. Links to pages not included in your paste are marked unverified, not assumed to be broken.

Does it crawl or fetch the linked pages?

No. It only analyzes the markup or sitemap text you paste. The validator does not make network requests, so it cannot confirm the live page contents or HTTP response.

What does x-default mean?

x-default identifies a fallback page for users whose language or region does not match another alternate. It is a special hreflang value, not a BCP 47 locale.

Is my pasted source uploaded?

No. Parsing and checks run locally in your browser.

Sources

  1. Google Search Central — localized versions
  2. W3C — language tags
  3. Sitemaps XML protocol

Safety and privacy: pasted markup is processed locally. Checks are limited to the source supplied and do not crawl the linked URLs.