Hreflang Tag Generator
Create correct hreflang tags so search engines show the right language or regional version of your page.
Loading tool…
Need help with this tool or found a problem? WhatsApp support Email
What does the Hreflang Tag Generator do?
If you have the same content in several languages or for different countries — for example English for Pakistan and English for the UK — hreflang annotations tell Google which version to show which users. This tool validates ISO 639-1 language codes and optional ISO 3166-1 region codes (en-GB, ur-PK), normalises their casing and adds an x-default fallback.
Output as HTML link tags for each page’s
, or as XML sitemap entries — useful for large sites.How to use the Hreflang Tag Generator
- Enter each version as “language-region | URL”, one per line.
- Add an x-default URL for users who do not match any version.
- Choose HTML tags or sitemap XML.
- Add the same full set to every language version.
Examples
Pakistan + UK
en-pk | https://example.com/pk/, en-gb | https://example.com/uk/, ur-pk | https://example.com/ur/ plus x-default.
Common use cases
- Launching multilingual websites
- Targeting the same language in different countries
- Fixing hreflang errors reported in Search Console
Features and benefits
- Private by design — your data is processed on your device and never uploaded.
- Free with no account, no watermark and no usage limits.
- Works on phones, tablets and desktops in any modern browser.
Limitations to know
- Each page must reference all versions including itself, and links must be reciprocal, or Google may ignore them.
Frequently asked questions
What is x-default?
The fallback page for users whose language or region is not listed — often a language selector or the main English page.
Is it en-uk or en-gb?
en-gb. Region codes follow ISO 3166-1, where the United Kingdom is GB.
Do I need hreflang for a single-language site?
No.
Related tools
All seo toolsCanonical URL Generator
Normalise URLs and generate rel=canonical tags.
XML Sitemap Generator
Turn a list of URLs into a valid XML sitemap.
Meta Tag Generator
Generate title, description, robots, viewport and canonical tags.
Schema Markup Generator
Generate JSON-LD for Article, Organization, Product, Person and more.
Twitter Card Generator
Generate X (Twitter) Card meta tags with a preview.
Meta Title Checker
Check title length in characters and pixels with a live Google-style preview.