Skip to content

Hreflang Tag Validator

Validate hreflang link tags offline. Paste tags or enter language codes and URLs to check ISO language and region codes, x-default, duplicates, conflicting URLs, absolute URLs, head placement and self-reference, then copy a corrected tag block.

Web & SEO Runs client-side Free to use
Jump to the tool
Share: X WhatsApp
Loading Hreflang Tag Validator…

About the Hreflang Tag Validator

Hreflang Tag Validator checks the alternate-language link tags that tell search engines which version of a page to show to which language or region. Paste the <link rel="alternate" hreflang="…"> tags or a full page source, or type the codes and URLs into rows.

Each code is checked against ISO 639-1 language codes and ISO 3166-1 region codes, so mistakes such as en-UK (use en-GB), a country code on its own, a numeric region, an underscore or a duplicate x-default are caught. URLs must be absolute http(s) addresses; duplicates, conflicting URLs, tags in the <body> and a missing self-reference are reported. When the problems can be fixed safely, the tool produces a corrected tag block. Because it is offline, it cannot visit the other pages to confirm that they link back, which hreflang requires.

How to use

  1. Choose to paste HTML tags or enter rows manually.
  2. Paste the tags, or enter a language code and URL in each row.
  3. Optionally enter the current page URL to check the self-reference.
  4. Click Validate and review the report and table.
  5. Copy the corrected tags or download the report.

Key features

  • ISO 639-1 language and ISO 3166-1 region code checks.
  • Catches en-UK, country-only, numeric and reversed codes.
  • x-default support and duplicate x-default detection.
  • Duplicate and conflicting code or URL detection.
  • Head placement check for pasted HTML.
  • Self-reference check when the current URL is given.
  • Corrected tag block, Copy Corrected Tags, Download Report, Reset and Back.

Best practices

  • Include a self-referencing hreflang entry on every page in the set.
  • Use the same complete set of tags on every alternate page so each one links back.
  • Use language codes, optionally with a region: en, en-GB, pt-BR.
  • Add x-default for a language selector or fallback page.
  • Use absolute https:// URLs that return the final page, not a redirect.

Benefits

  • Catches the most common hreflang code and URL mistakes.
  • Gives a ready-to-paste corrected block when it is safe.
  • Works on drafts and staging sites because nothing is fetched.
  • Private: nothing is uploaded or stored.

Frequently asked questions

Why is en-UK flagged?

UK is not an ISO 3166-1 country code. The code for the United Kingdom is GB, so English for the UK is en-GB. The corrected block changes it for you.

Can I use a country code on its own, like hreflang="de"?

hreflang="de" is valid, but it means German (the language), not Germany. A region must always follow a language, for example de-DE or de-AT. Codes such as "gb" or "us" on their own are errors.

What is x-default?

x-default marks the page to show when no other language or region matches, such as a language selector or international home page. It is optional but recommended, and it should appear only once.

Can this tool check that the other pages link back?

No. Return links (reciprocity) need every alternate page to be fetched, which this offline tool cannot do. Check each page in the set, or use a crawler you trust.

Why must hreflang tags be in the <head>?

Search engines read hreflang link elements only in the <head>. Tags in the <body> are ignored. You can also supply hreflang in an HTTP header or an XML sitemap.

Why is no corrected block shown?

The block is generated only when every problem can be fixed safely. Invalid codes, conflicting duplicates, malformed URLs or a missing self-reference need your decision, so fix them and validate again.

Is my content uploaded or saved?

No. Everything runs in your browser. What you paste or type is not sent anywhere, no URL is fetched, and nothing is saved in browser storage. Reset clears it from the page.