Hreflang Tag Validator
Check hreflang tags across pages or a sitemap, with a return-link matrix and a clear list of errors.
Formats this validator reads
Page heads: start each page with a line === https://example.com/page/, then paste its head HTML.
Sitemap: paste the XML with xhtml:link entries.
CSV: one line per tag: page URL, hreflang code, alternate URL.
Return links
Rows are pages. Columns are the codes they declare. ✓ means the target page links back.
How to use the hreflang validator
Paste the head HTML of each language version, an XML sitemap, or a CSV. The validator checks every tag and every return link.
- For page HTML, start each page with a line such as
=== https://example.com/uk/. - Paste the head of that page under it. Repeat for each version.
- Or paste a sitemap with xhtml:link entries, or open the file.
- Read the matrix. A cross means a page does not link back.
- Work through the errors, then download the list as a CSV.
What the validator checks
| Check | Why it matters |
|---|---|
| Language and country codes | Codes such as en-UK or a country alone are ignored |
| Return links | Google ignores a link if the other page does not link back |
| Self reference | Each page must list itself |
| Full set | Every page in a set should list the same versions |
| Canonical conflicts | Hreflang on a page that points its canonical elsewhere sends mixed signals |
| URLs | Relative links, duplicates and one code with two URLs |
The most common hreflang errors
- en-UK: the country code for the United Kingdom is GB.
- A country with no language: “de” is German, not Germany.
- Missing return links: often after a new page is added to one version only.
- Canonical to another page: hreflang should sit on pages that are their own canonical.
- Relative URLs: hreflang needs full addresses.
Checking a sitemap
An hreflang sitemap lists each URL with its alternates. Paste the XML and the hreflang sitemap validator reads every url block.
Return links are checked across the whole file. A page that lists a version, but is not listed back, shows as an error.
What it cannot see
The tool checks only what you paste. If a linked page is missing from your paste, its return link shows as a question mark.
It does not fetch live pages. Use View source in your browser, or export your sitemap, to get the code.
Why this hreflang tag validator is different
Many checkers test one URL at a time and need a live site. This one checks whole sets at once, from HTML, a sitemap or a CSV.
- Checks codes against the full ISO lists.
- A return-link matrix for every page and code.
- Self-reference, full-set and canonical checks.
- Works on staging sites, because nothing is fetched.
It follows the rules Google documents, so it also works as a Google hreflang validator. To build correct tags from scratch, use the Hreflang Tag Generator.
Private by design
The hreflang validator runs in your browser. Nothing you type or paste is sent to a server, and there is no sign-up.
Your last settings are saved on this device only. The tool is ready when you come back.
Frequently asked questions
How do I check hreflang tags?
Paste the head of each page, a sitemap or a CSV above. Errors and a return-link matrix appear at once.
What is a return link?
If page A lists page B, page B must list page A. Otherwise Google ignores the pair.
Can it validate an hreflang sitemap?
Yes. Paste the XML or open the file. Every url block is checked.
Why is en-UK an error?
The country code for the United Kingdom is GB. Use en-GB.
Does each page need to list itself?
Yes. The validator flags any page without a self reference.
Can hreflang and canonical conflict?
Yes. Put hreflang only on pages that are their own canonical.
Does it crawl my site?
No. It checks what you paste, so it also works on staging sites.
Is this hreflang tag validator free?
Yes. There is no sign-up.
Last reviewed 2026-11-30 · How we build and check our tools