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
Error hreflang pairs
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
- Add language-URL pairs (e.g. en-GB → /en/, de → /de/).
- Set an x-default URL.
- Choose output format: HTML link tags or XML sitemap.
- 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