Skip to content

Free Hreflang Tag Generator and Checker

Build hreflang tags and validate language and region codes against the ISO lists, all in your browser.

Free tool

Runs in your browser. Nothing you enter is uploaded or stored.

Loading the tool...

A hreflang generator builds the tags that tell search engines which language or regional version of a page to show each visitor. The free Hreflang Tag Generator and Checker above builds those tags and validates your language and region codes against the ISO lists. It runs in your browser, and nothing is uploaded.

A CSA Research survey of 8,709 consumers in 29 countries found that 76 percent of online shoppers prefer to buy products with information in their own language and that 40 percent will never buy from websites in other languages.

How to use the Hreflang Tag Generator and Checker

  1. List every language or regional version of the page, with the full URL of each.
  2. Choose the language, and the region where it applies, for each version.
  3. Generate the tags and check the validation messages for any code that is not recognised.
  4. Add the full set of tags to every version of the page, not only to one.
  5. Test the live pages afterwards, and confirm each version points to the others.

How to read the results

Each tag pairs a code with a URL. The code is a language, optionally followed by a region, such as en for English or en-GB for English for the United Kingdom. Google states that only language codes in ISO 639-1 and region codes in ISO 3166-1 Alpha 2 are supported, and the checker validates against those lists.

  • A valid code is recognised in the ISO lists and formatted as language, or language and region.
  • An invalid code is flagged so you can correct it before the tags go live.
  • The set of tags should include one entry for each version, including the page itself.

A good result is a complete set with valid codes, absolute URLs and the same set on every version. A bad one has unknown codes, missing versions or addresses that do not load.

Common problems this finds

  • Missing return links. Google says that if page X links to page Y, page Y must link back to page X, or the annotations may be ignored. Put the full set on every version.
  • No self-reference. Each version must list itself as well as the others.
  • Region used alone. A region code such as GB on its own is not valid. It must follow a language, as in en-GB.
  • Invalid region codes. Values such as UK or EU are not on the list. The United Kingdom is GB in this system.
  • No fallback. Consider an x-default entry for visitors whose language matches none of your versions.
  • Tags pointing at broken or redirected URLs. Use the final live address for each version.

A worked example

This is an illustrative example. A hotel site has English pages for the UK and the US, plus an Arabic page. You list three URLs, set en-GB, en-US and ar, and add x-default pointing at the main English page. The checker accepts all codes. You paste the four tags into the head of all three pages, so every page carries the same complete set. If you had typed en-UK instead, the validation would have flagged it.

Why it matters for SEO

When you serve the same or similar content in several languages or for several countries, search engines have to decide which version suits each searcher. Hreflang gives them that information, so a visitor in the United Kingdom is more likely to see the UK page and a visitor reading Arabic is more likely to see the Arabic one. It also helps keep your own versions from being treated as unrelated duplicates competing with each other. The tags only work when they are complete and consistent, which is why validating the codes and checking the return links before you publish saves time later.

Plan your set of versions first, and only then generate tags. Adding a new language later means updating the tags on every existing version, so keep your list of URLs somewhere you can reuse.

Limits and where to put the tags

Google says you can use HTML link tags, HTTP headers or an XML sitemap, and that each method works equally well, so choose one and keep it consistent. The tool checks that codes are valid. It does not visit your pages, so it cannot confirm that the URLs exist, that the tags are live, or that the content is really translated. Hreflang is a hint rather than a command, and Google may still choose another version. After publishing, check each URL with the Redirect and Status Code Checker to make sure none redirect, and list them in a sitemap built with the XML Sitemap Generator if you want.

Questions about the Hreflang Tag Generator and Checker

What is the difference between en and en-GB?

The code en targets English speakers in general, while en-GB targets English speakers in the United Kingdom. Use the region only when you have separate versions for different countries.

Do I need hreflang if my site has one language?

No. It is for sites with the same or similar content in several languages or regional versions. A single-language, single-country site has nothing for the tags to choose between.

What does x-default do?

It names the fallback page for visitors whose language or region does not match any of your versions. Google recommends it for that purpose, often pointing at a language selector or your main version.

Back to all free technical SEO tools or the full toolkit. If you would rather have someone check the whole site, see my technical SEO services or ask for a free audit.