Hreflang Tag Generator

Generate hreflang link tags, HTTP headers and XML sitemap entries for multilingual and multi-region sites.

Runs instantly in your browser — results update as you type.

How do I add hreflang tags?

List every language version as “code | URL” (for example en-gb | https://example.com/uk/). The generator validates the ISO language and region codes and writes the link tags for the <head>, the equivalent HTTP header for PDFs, and an XML sitemap with xhtml:link entries.

Rules Google requires

  • Every version must list all versions, including itself.
  • Links must be reciprocal — if A points to B, B must point to A.
  • Use language codes (ISO 639-1) and optional region codes (ISO 3166-1): en, en-GB, es-MX. “UK” is wrong — use GB.
  • Add x-default for a language selector or fallback page.

Frequently asked questions

Do I need hreflang for one language?

No, only when you have equivalent pages in several languages or regions.

Tags, header or sitemap?

Any one method is enough; sitemaps are easiest for large sites.

How do I check existing tags?

Use the Hreflang Checker.