SEO & web

Hreflang tag generator

Generate hreflang link tags for multilingual and multi-regional pages. Validates language-region codes and includes x-default.

  • Free, no sign-up
  • No data stored
  • Reviewed 2026-01-15

Your details

Results

About the Hreflang Tag Generator

Enter URL and language-region pairs to generate correct hreflang link elements. The tool validates ISO 639-1 language codes and optional ISO 3166-1 region codes. An x-default option specifies the fallback URL for unmatched locales.

How to use the Hreflang Tag Generator

  1. Add language-URL pairs (e.g. en-GB → /en/, de → /de/).
  2. Set an x-default URL.
  3. Choose output format: HTML link tags or XML sitemap.
  4. Copy the generated code.

Frequently asked questions

What is x-default?

A fallback for users whose language/region does not match any listed hreflang. Typically points to your homepage or a language-selector page.

Must hreflang be reciprocal?

Yes. If page A links to page B with hreflang, page B must link back to page A. Non-reciprocal annotations may be ignored by Google.

Can I use hreflang in the sitemap?

Yes. Add xhtml:link elements within each entry. This tool can output either HTML tags or sitemap XML format.