hreflang Generator
Add each language or region and its URL, and get valid hreflang link tags — including x-default — ready to paste into your head. Generated in your browser.
1. Language versions
Local2. Generated tags
HTMLAbout hreflang Generator
The hreflang Generator builds valid hreflang link tags for each language or region you add, including the x-default tag, ready to paste into your head. It is for developers and SEO specialists managing multilingual or multi-regional sites.
Hand-writing hreflang is error-prone, and mistakes cause the wrong page to show in the wrong region. Generating the tags locally produces correct syntax with x-default handled, and your URLs stay private.
Step by step
- Add each language or region along with its page URL.
- Include an x-default entry for users who match no specific locale.
- Review the generated link tags.
- Copy them into the head of each corresponding page.
What it offers
- Per-language and per-region hreflang tags
- x-default support
- Valid, ready-to-paste output
- hreflang tags generated in the browser
Where it helps
- Connecting language versions of the same page
- Targeting regional variants such as en-GB and en-US
- Adding an x-default fallback for unmatched visitors
- Implementing hreflang during an internationalisation project
Tips for best results
- Make hreflang references reciprocal — every page in the set should point to all the others.
- Use valid language and region codes, and point only to canonical URLs.
- Include an x-default for visitors whose language or region you do not specifically target.
Pitfalls to watch for
- Listing a hreflang relationship on one page but not reciprocating it on the others; the references must be mutual.
- Using an incorrect language or region code instead of the standard format.
- Pointing hreflang at non-canonical or redirecting URLs.
Why people use it
Correct syntax
Tags follow the expected hreflang format.
x-default handled
Covers visitors who match no listed locale.
Saves errors
Avoids the typos that break manual hreflang.
Private
Your URLs stay in the browser.
Common questions
This runs entirely in your browser
No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.