Free Tool

Free Hreflang Tag Checker & Generator

A free hreflang checker and hreflang tag generator: fetch any page, validate every hreflang tag, verify return links between language versions, and generate correct tags for your URLs.

Reads link tags in the HTML head. HTTP Link headers and sitemap hreflang are not covered.

No signup required
Free forever
GDPR compliant
Powered by U2L

Quick Answer

An hreflang checker fetches a page, reads every <link rel="alternate" hreflang> in its head, and validates the language and region codes, the URLs, the self-referencing tag, and the return links on each alternate page. Paste a URL into the U2L Hreflang Checker to test hreflang tags, then use the generator tab to build correct HTML, sitemap, and HTTP header tags. Free, no signup.

Quick Facts

  • Google reads hreflang from three equivalent places: <link> tags in the HTML head, an HTTP Link: header, or <xhtml:link> entries in an XML sitemap.
  • Every hreflang cluster must be bidirectional: if page A lists page B but page B does not list page A, Google ignores the annotation.
  • Each page must include a self-referencing hreflang tag that points to its own URL, in addition to every other language version.
  • Codes follow ISO 639-1 for language (en, de, pt) plus an optional ISO 3166-1 alpha-2 region (en-GB, pt-BR). A region code alone is invalid, and UK, EU, and UN are not valid regions.
  • x-default marks the fallback page shown when no other language or region matches the user's browser setting; it is optional but recommended.
  • Alternate URLs must be fully qualified with the scheme, for example https://example.com/de/, not //example.com/de/ or /de/.
  • Search Console stopped reporting hreflang errors when the International Targeting report was removed in September 2022, so a standalone checker is now the only way to see no-return-tag problems.

How to check hreflang tags

Fetch, validate, verify return links, then generate correct tags if anything is missing.

  1. 1

    Paste the page URL

    Enter the full URL of one language version, for example https://example.com/de/pricing. The tool fetches the HTML through a stateless pass-through and reads every <link rel="alternate" hreflang> in the head.

  2. 2

    Read the validation table

    Each tag is listed with its hreflang value, URL, and status. Errors cover invalid language or region codes, relative URLs, duplicate hreflang values, conflicting URLs, a missing self-reference, and a canonical tag that disagrees with the page URL.

  3. 3

    Verify return links

    Click Verify return links. The tool fetches up to 25 alternate pages, three at a time, and confirms that each one links back to the original URL with the code the original used for itself. Missing return links are the single most common hreflang failure.

  4. 4

    Generate corrected tags

    Switch to the Generator tab, enter each language, optional region, and URL, toggle x-default, and copy the output as HTML <link> tags, a sitemap <xhtml:link> block, or an HTTP Link: header. Paste the same set into every page in the cluster.

What is a Hreflang Checker?

Hreflang Checker is a tool that fetches a page, extracts every hreflang annotation from its HTML head, validates the language and region codes and URLs against Google's rules, and then visits each alternate page to confirm the return link exists. A generator tab builds the correct tags for a set of URLs in all three formats Google accepts.

hreflang is the attribute that tells Google which language and, optionally, which region a page targets, and where the equivalent versions for other audiences live. A German page at example.com/de/ declares itself with hreflang="de" and points to its English sibling with hreflang="en"; the English page must do the same in reverse. When the cluster is complete, Google shows the German URL to German-language searchers and the English URL to everyone else, instead of picking one at random or treating the two as duplicates.

The rules are strict and unforgiving. Every page in the cluster must list every other page and itself, codes must be ISO 639-1 language codes with an optional ISO 3166-1 alpha-2 region, and URLs must be absolute. A single missing return link, a made-up code like en-UK, or an underscore instead of a hyphen makes Google drop the annotation for that pair silently. Since the International Targeting report was removed from Search Console in September 2022, Google no longer tells you when that happens.

An hreflang tag checker fills that gap. It reproduces what Googlebot sees on one page, applies the same validation rules, and, on request, fetches the alternate pages to confirm the bidirectional requirement. Sites with many locales use it after every template change; U2L's own marketing site serves 56 locales and depends on the same self-referencing pattern this tool checks.

How does a Hreflang Checker work?

The checker requests the page through /api/tools/fetch-text, a stateless pass-through that exists only because browsers cannot read another origin's HTML directly. It follows up to 5 redirects, rejects private network addresses, and returns the first 1 MB of the body with the final URL, HTTP status, and Content-Type; nothing is stored. The HTML is parsed in your browser with the native DOMParser in text/html mode, and every <link> element whose rel contains alternate and which carries an hreflang attribute is collected, along with the <link rel="canonical"> if present. Tags injected by JavaScript after load are not seen, which matches how the raw HTML looks to a crawler before rendering.

Each tag is validated independently. The hreflang value is split on the hyphen: the first part must be a two-letter ISO 639-1 language code, an optional second part must be a two-letter ISO 3166-1 alpha-2 region code, and the reserved value x-default is accepted as-is. Underscores, three-letter language codes, region-only values, and invented regions such as UK or EU are errors. The href must parse as an absolute http or https URL; protocol-relative and path-relative values are errors because Google requires the transport method. Cluster-level checks then run: duplicate hreflang values, two different URLs for the same code, the same URL under two codes (a warning), and whether one tag points at the fetched page itself, which is the self-referencing requirement.

Return link verification is explicit because it multiplies the number of requests. When you click the button, the tool takes the distinct alternate URLs other than the page itself, caps the list at 25, and fetches them three at a time through the same pass-through. For each alternate it looks for a tag whose href resolves to the original page's URL and checks that the code on that tag equals the code the original page used for its own self-reference. Only the annotation methods visible in HTML are inspected: hreflang declared in an HTTP Link: header or in an XML sitemap is not read by this tool.

The generator works the other way around. You enter rows of language, optional region, and URL, and the tool validates each code against built-in ISO 639-1 and ISO 3166-1 alpha-2 lists as you type. The same row set is rendered as HTML <link rel="alternate" hreflang="..." href="..."> tags for the head, as a sitemap <url> block with the xhtml namespace and one <xhtml:link> child per version, and as a single HTTP Link: header with comma-separated entries. The three methods are equivalent from Google's perspective; pick the one your stack can maintain and use it consistently across the cluster.

Use Cases

How marketers, businesses, and developers use hreflang checker.

Finding missing return tags after the Search Console report went away

The International Targeting report used to list hreflang pairs with no return tags. It was removed in September 2022 and nothing replaced it. Run the checker on one page per cluster and click Verify return links to get the same diagnosis for the pages you care about most, such as the homepage and top landing pages.

Validating hreflang tags after a CMS or template change

A new head template, a plugin upgrade, or a locale added to the router can silently change every tag on the site. Check a sample page from each locale after the deploy: invalid codes, relative URLs, and a lost self-reference show up immediately, before Google recrawls and drops the cluster.

Generating hreflang tags for a new market

Launching a Portuguese version for Brazil means adding pt-BR to every existing page in the cluster and giving the new page the full set. Enter the rows once in the generator, copy the HTML block, and paste it into every version so each page carries identical annotations.

Debugging the wrong language showing in search results

When Google shows the English page to German searchers, the usual causes are a missing de return link, an en-DE tag that should be de-DE, or a canonical tag on the German page pointing at the English URL. The validation table surfaces all three from a single fetch.

Checking canonical and hreflang agreement

Google indexes only the canonical URL, so an hreflang cluster must point at canonical URLs and each page's canonical must be its own address. The tool compares the canonical with the fetched URL and flags a mismatch; run /tools/canonical-url-checker for the deeper canonical audit.

Building the sitemap hreflang block for large sites

Sites with dozens of locales prefer the sitemap method because it keeps the tags out of every page's head, where a 50-locale cluster adds 50 lines per page. The generator emits the <url> block with the xhtml namespace ready to drop into your sitemap; validate the finished file with /tools/sitemap-validator.

Producing the HTTP Link header for PDFs and files

Non-HTML documents cannot carry a <link> tag, so Google reads hreflang for them from an HTTP Link: header. The generator formats the header with every version and the correct rel and hreflang parameters; copy it into your server or CDN configuration for the file's URL.

Auditing an agency or vendor implementation

Before signing off on an international build, spot-check the top pages in each locale. The matrix shows every declared version with its return status, so you can send a precise list of failing pairs instead of a vague request to fix hreflang.

Adding x-default for a language selector

A country or language chooser page should be the x-default target so searchers with an unmatched locale land on a page that lets them pick. Toggle x-default in the generator, set its URL to the selector page, and the tag is added to every format.

Hreflang Checker vs Alternatives

Side-by-side feature and pricing comparison with the top alternatives.

FeatureU2LTechnicalSEO.com hreflang testerSISTRIX hreflang validatorAleyda Solis generator
Free, no signup25 checks/day free
Checks HTML hreflang tags on a live page
Verifies return links on alternate pagesUp to 25 per run
Reads HTTP Link header and sitemap hreflangVaries
Generates tagsHTML, sitemap, HTTP headerHTML and sitemap
Validates ISO 639-1 and ISO 3166-1 codesDropdowns
Canonical vs self URL checkVariesVaries
Parsing runs in your browserVaries

Hreflang Checker vs TechnicalSEO.com hreflang Tags Testing Tool

Merkle's tester on TechnicalSEO.com is the most complete free checker for coverage: it reads hreflang from HTML, from the HTTP Link header, and from XML sitemaps, and it verifies return links. If your implementation lives in a sitemap or a header, that tool inspects it and this one does not.

U2L's checker covers HTML tags only, which is where the large majority of implementations live, and adds a generator in all three output formats plus a canonical check in the same view. It also parses in your browser and stores nothing. Use TechnicalSEO.com when you need sitemap or header coverage; use this tool for fast HTML checks and for producing the tags to fix what you find.

Hreflang Checker vs SISTRIX hreflang validator

SISTRIX bundles a validator and a generator, checks live URLs for missing return links and bad codes, and allows a limited number of free checks per day before asking you to register. It is a solid tool inside a paid SEO suite, and the daily cap is the practical difference for someone auditing many pages.

This tool has no daily limit and no account. The trade-off is scope: SISTRIX may cover more annotation sources, while U2L focuses on HTML tags, return-link verification for up to 25 alternates per run, and a generator that also emits the HTTP header format.

Best Practices

Give every page the full set, including itself

Each page in a cluster carries the same list: every language version plus a self-referencing tag. If the German page lists en and fr but not de, Google treats the self-reference as missing. Generating the block once and reusing it on every version is the simplest way to keep the sets identical.

Use hyphenated ISO codes and real regions

Write en-GB, not en-UK or en_GB. Language codes come from ISO 639-1 (two letters), regions from ISO 3166-1 alpha-2 (two letters). Continents and unions are not regions, so en-EU is invalid; use en for the language alone and add region codes only where you serve region-specific content.

Point hreflang at canonical, indexable URLs

Google indexes the canonical URL, so alternates must reference canonical addresses and each page's canonical must be its own URL. A page whose canonical points elsewhere, or which carries noindex, cannot be returned as an alternate, and the pair is wasted. Check with /tools/canonical-url-checker.

Add x-default for the fallback experience

Set hreflang="x-default" on the page you want shown when no version matches the searcher's language, typically the language selector or the global English page. It is optional, but without it Google picks a fallback for you. Include the x-default tag on every page in the cluster like any other version.

Keep the same URL in every declaration

The href on every tag must be the exact URL the target page canonicalizes to: same scheme, host, trailing slash, and casing. https://example.com/de and https://example.com/de/ are different URLs, and a return link to the wrong variant is a missing return link as far as Google is concerned.

Choose one implementation method per cluster

HTML tags, HTTP headers, and sitemap entries are equivalent to Google. Mixing them is allowed but doubles the places a mistake can hide. Sites with many locales usually pick the sitemap to keep page heads small; validate the result with /tools/sitemap-validator.

Recheck after every locale or template change

Adding a locale changes every page in the cluster, not just the new one, because each existing page must now list the newcomer. Check one page per locale after the deploy, and run return link verification on the homepage cluster where a miss is most costly.

Keep hreflang and og:locale consistent

Open Graph locale tags do not affect hreflang, but a page declaring hreflang="de-AT" with og:locale="en_US" confuses reviewers and social previews. Check the social tags with /tools/og-tag-checker and align them with the hreflang value.

Common Mistakes to Avoid

Missing return links

Page A lists page B, but page B was built from an older template and does not list page A. Google ignores the annotation on both sides. Verify return links on the alternate pages, not just the page you happen to be looking at.

en-UK, en_GB, and other invented codes

The United Kingdom is GB in ISO 3166-1, and the separator is a hyphen. en-UK, en_GB, and eng-GB are all invalid and dropped. The checker validates both halves against the ISO lists.

Relative URLs in href

hreflang requires a fully qualified URL with the scheme. /de/ and //example.com/de/ are ignored. Generate the tags with absolute URLs, and keep the scheme consistent with the canonical (https).

No self-referencing tag

Listing only the other languages looks reasonable but breaks the rule that each version must list itself. Every page needs a tag whose href is its own URL and whose hreflang is its own code.

Mixing hreflang with noindex or a foreign canonical

A noindex page, or a page whose canonical points at another URL, cannot appear in results and so cannot be an alternate. Remove it from the cluster or fix the directive so the page is indexable in its own right.

Region code without a language

hreflang="gb" or hreflang="us" is invalid because the first code must be the language. Google's example: be is Belarusian, not Belgium. Use en-GB or en-US, or drop the region entirely.

Technical Specifications

Sources readHTML <link rel="alternate" hreflang> tags and <link rel="canonical"> in the fetched page
Not readHTTP Link: header and XML sitemap hreflang (generator can emit both)
Code validationISO 639-1 language (two letters) plus optional ISO 3166-1 alpha-2 region, or x-default
URL ruleAbsolute http or https URL required; relative and protocol-relative values are errors
Return link verificationUp to 25 alternate pages per run, 3 fetched concurrently, explicit button
FetchStateless pass-through, up to 5 redirects, first 1 MB of the body
Generator outputHTML <link> tags, sitemap <xhtml:link> block, HTTP Link: header
PrivacyParsed in your browser; nothing is stored or cached by U2L

Frequently Asked Questions

What is an hreflang checker?

An hreflang checker fetches a page, reads its hreflang annotations, and validates them against Google's rules: correct ISO language and region codes, absolute URLs, a self-referencing tag, no duplicates, and return links on every alternate page. It shows exactly which tags Google will accept and which it will ignore.

How do I check hreflang tags on my site?

Paste one page URL into the hreflang checker, review the validation table for code and URL errors, then click Verify return links so the tool fetches each alternate and confirms it links back. Repeat for one page per template or section, since tags are usually generated per template.

Is this hreflang tag checker free?

Yes. There is no signup, no daily limit, and no account. Pages are fetched through a stateless pass-through and parsed in your browser; the generator runs entirely on your device.

Is my page content uploaded or stored?

No. The pass-through returns the HTML to your browser and keeps nothing. Parsing, validation, and tag generation happen locally. Only the public URL you enter is sent to the fetch endpoint.

Why does the checker say my return links are missing?

The alternate page either has no tag pointing back to the original URL, points to a different variant of it (trailing slash, http vs https, www), or uses a different code than the original page uses for itself. Open the alternate page's head and compare the href character by character with the original URL.

Why are my hreflang tags not detected?

The tool reads <link> tags in the raw HTML. Tags injected by JavaScript after load, tags placed in the body instead of the head, hreflang sent in an HTTP Link header, or hreflang declared only in the XML sitemap are not seen. Check where your implementation lives and view the page source to confirm.

Why does Google show the wrong language version?

The usual causes are a missing return link, an invalid code such as en-UK, a canonical tag pointing at another language, or the page being noindex. Any of these breaks the pair and Google falls back to its own choice. Fix the tags, then wait for both pages to be recrawled.

What does x-default mean in hreflang?

x-default marks the page to show when no other hreflang value matches the user's language or region. It is typically a language selector or the global English page. It is optional, must be included in every page's tag set, and can be combined with regular language tags on the same page.

Does hreflang need a self-referencing tag?

Yes. Google states that each language version must list itself as well as every other version. A page at example.com/fr/ needs a tag with hreflang="fr" and href="https://example.com/fr/" alongside its links to the other languages.

Should I use en-GB or en-UK?

en-GB. Region codes come from ISO 3166-1 alpha-2, where the United Kingdom is GB. UK is not a valid code and Google ignores the tag. The same applies to EU and other non-country codes; use the plain language code when you do not target a specific country.

How do hreflang and canonical tags interact?

Google indexes the canonical URL, so hreflang must point at canonical URLs and each page's canonical should be its own address. If the German page's canonical points at the English page, Google treats the German page as a duplicate and it cannot serve as an alternate. Verify with /tools/canonical-url-checker.

Can I put hreflang in the sitemap instead of the HTML?

Yes. Add xmlns:xhtml="http://www.w3.org/1999/xhtml" to the urlset and one <xhtml:link rel="alternate" hreflang="..." href="..."/> per version inside each <url>, including the self-reference. Google treats the sitemap method as equivalent to HTML tags. The generator outputs this block ready to paste.

How do I add hreflang to a PDF?

Send it in the HTTP Link header for the file URL: Link: <https://example.com/file-en.pdf>; rel="alternate"; hreflang="en", <https://example.com/file-de.pdf>; rel="alternate"; hreflang="de". The generator formats this header for any set of URLs.

Does Search Console report hreflang errors?

Not anymore. The International Targeting report, which listed pairs with no return tags and unknown language codes, was removed in September 2022 and nothing replaced it. Third-party checkers like this one are now the way to find those errors.

Is there a limit to how many hreflang tags a page can have?

Google does not publish a per-page cap, but every tag adds to the page head and must be mirrored on every other version. A site with 56 locales carries 57 tags per page including x-default. For very large clusters the sitemap method keeps page weight down.

Hreflang checker vs a full site crawler: which do I need?

A crawler such as Screaming Frog audits hreflang across every page at once and is the right tool for a full-site report. This checker is for fast, targeted checks of a single cluster with return-link verification and a generator to fix what it finds, without installing anything.

Hreflang tag generator vs writing tags by hand: what is the difference?

Hand-written tags are where en-UK, underscores, and relative URLs come from. The generator validates every code against the ISO lists and builds absolute URLs into all three formats from one set of rows, so every page in the cluster gets an identical, valid block.

Key Terms

hreflang
An attribute on <link rel="alternate"> that names the language, and optionally region, of an alternate version of the page and its URL.
Return link
The reciprocal annotation: if page A points to page B with hreflang, page B must point back to page A, or Google ignores the pair.
Self-referencing tag
The hreflang tag on a page whose href is the page's own URL. Required on every page in a cluster.
x-default
The reserved hreflang value for the fallback page shown when no language or region version matches the user.
ISO 639-1
The two-letter language code standard used in hreflang: en, de, ja, pt.
ISO 3166-1 alpha-2
The two-letter country code standard used for the optional region in hreflang: US, GB, BR, IN.

Right language, right link

Once every locale is wired up, send each market a short branded u2l.ai link with click analytics by country, and add QR codes for print campaigns. Sign up free and manage every link in one place.

Sign up free