Hreflang Tag Generator

Build valid hreflang annotations for multi-language and multi-region sites, including x-default, with HTML link tags, HTTP headers, XML sitemap xhtml:link blocks, and validation warnings.

Add one language or language-region pair per row, with the absolute URL that should be served to that audience. ISO 639-1 languages, optional ISO 15924 scripts (for example zh-Hans), and ISO 3166-1 regions are validated as you type.

Hreflang (e.g. en, en-GB, zh-Hans-CN)Absolute URL

Validation

HTML link tags



HTTP Link header



XML sitemap with xhtml:link



How to use this tool

  1. Add a row for each language or language-region version of the page and paste its absolute URL.
  2. Use ISO 639-1 language codes, optional ISO 15924 scripts (zh-Hans), and ISO 3166-1 regions (en-GB, not en-UK or en_GB).
  3. Keep x-default enabled so unmatched languages have a fallback URL.
  4. Copy the HTML link tags, the HTTP Link header, or a sitemap fragment. Place the full reciprocal set on every alternate URL.

Official documentation

Frequently asked questions

Google's hreflang documentation requires fully-qualified URLs, including the protocol. Relative paths are flagged so you do not paste annotations that crawlers will ignore or resolve incorrectly.

Yes. Each language version should list every other version, and an x-default where you have a fallback. This generator emits the full set; you must place that set on every URL in the cluster.

No. The official ISO 3166-1 code for the United Kingdom is GB, so British English is en-GB. Underscores such as en_GB are also rejected in favour of a hyphen.

Back to the new technical SEO tools · All tools · Read the guides