Free Hreflang Tag Checker

Validate hreflang tags in your page HTML. Detects missing x-default, duplicate locales, relative URLs, and invalid BCP 47 language codes.

Updated

Share:
Home/SEO Tools/Hreflang Checker

Hreflang Checker

Validate hreflang tags to ensure correct international SEO targeting and avoid duplicate content issues.

Hreflang Tag Checker

Copy page source (Ctrl+U) and paste here, or use browser DevTools to copy the <head>.

Hreflang Best Practices

Always use absolute URLs

Hreflang href values must be fully qualified URLs (https://...), not relative paths.

Include x-default

Add hreflang="x-default" for users whose language/region is not explicitly targeted.

Self-reference required

Each page must include a hreflang tag pointing to itself. Google requires this.

Bidirectional links

If page A links to page B with hreflang, page B must link back to page A. Missing return links are ignored.

Use valid BCP 47 codes

Use ISO 639-1 language codes (en, fr, de) optionally combined with ISO 3166-1 region codes (en-GB, fr-CA).

No duplicate locales

Each language/region combination should appear only once. Duplicates cause Google to ignore all but one.

Hreflang tags tell Google which language and regional variation of a page to show in search results. Incorrect implementation can cause the wrong page to rank in the wrong country.

Frequently Asked Questions

What errors are checked?

Missing x-default, self-referential tag, duplicate locales, invalid language codes, and relative URLs.

What is x-default?

x-default tells Google which page to show users whose language/region is not specifically targeted.

Is it free?

Yes, completely free.

Is my data safe with this tool?

Absolutely. The Hreflang Tag Checker processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.

Does the Hreflang Tag Checker work on mobile devices?

Yes, the Hreflang Tag Checker is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.

Do I need to create an account to use this tool?

No account or registration is needed. Simply open the Hreflang Tag Checker in your browser and start using it immediately. There are no sign-up walls or usage restrictions.

Does this tool follow Google's latest guidelines?

Yes, the Hreflang Tag Checker is built following current Google Search guidelines and best practices. We regularly update the tool to reflect changes in search engine requirements.

How do I use the Hreflang Tag Checker?

Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.

Which browsers are supported?

The Hreflang Tag Checker works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.

What is the difference between hreflang and a canonical tag?

A canonical tag and an hreflang tag solve different problems, and confusing them is a common cause of indexing trouble. A canonical (rel="canonical") tells Google which version of near-duplicate pages is the preferred one to index, consolidating ranking signals onto a single URL. Hreflang (rel="alternate" hreflang) does the opposite: it tells Google that several pages are legitimate language or regional variants that should all stay indexed, and which to show each user. The key rule is that each localized page should self-canonicalize, pointing its canonical at itself, not at one master language. Pointing every translation's canonical at the English page effectively tells Google to drop the translations, which silently breaks your hreflang setup. Paste your page's HTML above to confirm the hreflang annotations themselves are valid before you audit canonicals.

Why is Google ignoring my hreflang tags?

Google ignores hreflang annotations when they fail validation rather than warning you, which is why broken setups go unnoticed for months. The most frequent reasons are missing return links (page A points to page B, but B never points back to A, so the relationship is dropped), relative href values instead of absolute https URLs, missing self-referential tags, duplicate locale codes where the same code appears twice, and invalid language or region codes that aren't recognized BCP 47. A single conflicting canonical tag on the localized page can also override the whole cluster. Because these are structural problems, not visible on the rendered page, they're hard to spot by eye. Paste your page's HTML above and the checker lists each tag it finds and flags missing x-default, relative URLs, duplicates, and unknown locales instantly.

Does every page need a self-referential hreflang tag?

Yes. Every page in an hreflang set must include a tag that points to itself, in addition to tags for all its language and regional variants. So if you have English, French, and German versions, the English page lists all three hreflang annotations, and one of those points back to the English URL. Without that self-reference, the cluster is technically invalid and Google may disregard the entire set. This is the one rule that's invisible when you only inspect the markup, because you have to know which URL the page lives at to confirm the self-tag is present. That's why this checker has an optional Current Page URL field: enter the URL you're inspecting, paste the HTML, and it verifies the self-referential tag exists alongside the other validations.

What is the correct format for an hreflang language code?

Hreflang values follow BCP 47, which means an ISO 639-1 language code on its own, optionally followed by an ISO 3166-1 region code. A language-only value like "fr" targets all French speakers regardless of country, while "fr-CA" targets French speakers in Canada specifically. The language part is required; the region is optional but, when present, must be a valid country code, not a language. A frequent mistake is writing "en-uk" instead of the correct "en-gb," since UK is not the ISO country code for Britain. Codes are case-insensitive to crawlers, and the special value "x-default" marks your fallback page. This checker validates each code against a built-in list of common BCP 47 combinations and flags anything unrecognized, so paste your HTML above to catch malformed codes before they cost you international visibility.

Can a single page's HTML confirm my whole hreflang setup is correct?

Not entirely, because hreflang is bidirectional and this kind of check sees only one page at a time. When you paste a page's HTML, the tool validates that page's tags thoroughly: it confirms absolute URLs, a self-reference, an x-default, no duplicate locales, and valid codes. What it can't see is whether every other URL in the set links back, and missing return links cause Google to drop the relationship even when each page looks fine on its own. The practical workflow is to run each page in the cluster through the checker so you verify all of them list each other consistently. Also note this reads tags from the HTML head, so if your annotations live only in an XML sitemap or HTTP headers, paste the page markup here for the head-based check and audit those sources separately.

About the Hreflang Tag Checker

The Hreflang Tag Checker is a free tool for validating the hreflang annotations on a multilingual or multi-regional page. Paste your page's HTML — or just the <head> section — and it finds every <link rel="alternate" hreflang="..."> tag, lists them, and flags the mistakes that most commonly stop Google from honoring your international targeting. It's built for SEOs, developers, and site owners who run the same content across several languages or countries and need to confirm the tags are actually correct before search engines crawl them.

Everything runs in your browser. The HTML you paste is parsed locally on your device and never uploaded to a server, so you can check staging pages, client sites, or anything behind a login without it leaving your machine. There's no sign-up and nothing to install.

What hreflang tags do and why they break

Hreflang annotations tell Google which language and regional version of a page to show each user — for example, serving the en-GB page to a searcher in the UK and the en-US page to one in the United States. Done right, they prevent your translated or localized pages from competing with each other as duplicate content. Done wrong, they're silently ignored, and the wrong page can rank in the wrong country.

The errors are easy to make and hard to spot by eye, which is what this checker is for. It detects:

  • Missing x-default — the fallback annotation for users whose language or region you don't explicitly target.
  • Missing self-reference — every page in a hreflang set must include a tag pointing to itself; without it the cluster is invalid.
  • Duplicate locales — if the same language/region code appears twice, Google ignores all but one of those entries.
  • Invalid or unknown locale codes — codes that aren't valid BCP 47 (an ISO 639-1 language like fr, optionally with an ISO 3166-1 region like fr-CA).
  • Relative URLs — hreflang href values must be absolute (starting with https://); relative paths don't work.

How to use it

Open your page's source with Ctrl+U (or copy the <head> from your browser's DevTools) and paste it into the box. Optionally enter the current page's URL in the first field — when you do, the checker confirms the page includes a self-referential tag, the one rule that's invisible without knowing which URL you're on.

Press Check Hreflang Tags and you get a count of how many annotations were found, a plain-language list of any issues, and a per-tag breakdown showing each locale, its target URL, and whether it passed. If no tags are found at all, it tells you so — usually a sign you pasted the <body> instead of the <head>.

What it checks against, and what it can't see

The checker validates locale codes against a built-in list of common BCP 47 combinations covering the major languages and their frequent regional variants. It works on the markup you give it, so it catches structural and syntax problems instantly.

One limit worth knowing: hreflang is bidirectional. If page A links to page B, page B must link back to page A, or Google drops the relationship. Because this tool sees one page's HTML at a time, it validates that page's tags but can't confirm the return links on every other page in the set — you'll want to run the others through as well. It also reads tags from the HTML <head> specifically; if your hreflang annotations live only in an XML sitemap or HTTP headers, paste the relevant page markup here for the <head>-based check.

Paste your HTML above to see your hreflang tags parsed and validated, then fix any flagged issues before they cost you international visibility.