Web Tools
Hreflang Generator
Generate hreflang tags for multilingual pages. Free online tool — no sign-up required.
See how to use this toolHreflang Generator
Generate alternate language tags for multilingual pages.
Privacy: this tool processes input locally in your browser without server upload.
About Hreflang Generator
ToolConv's hreflang generator produces the link rel='alternate' hreflang tags that tell Google which language/region variant of a page to show in which market. You list each locale's URL and its hreflang code (en, en-GB, zh-Hans, es-ES, x-default), and the tool emits the full tag set including the mandatory self-referential tag and the x-default fallback that Google requires for pages without a matching locale.
The generator validates the most common hreflang mistakes: forgetting the self-reference, using an underscore (en_GB) instead of the spec-correct hyphen (en-GB), omitting x-default, listing a locale pair twice, and using ISO 639-1 language codes that do not exist. It also flags bidirectional return-tagging errors, which Google warns will cause the entire hreflang cluster to be ignored. Nothing is uploaded — the entire form and tag generation runs locally in your browser.
How to use it
- 1List each locale's full URL and its hreflang code (e.g. en, en-GB, zh-Hans, es-ES).
- 2Mark one URL as x-default — the fallback for visitors without a matching locale.
- 3The tool auto-adds the mandatory self-referential tag for each locale you list.
- 4Review validation warnings: missing x-default, underscore codes, duplicates.
- 5Copy the link rel='alternate' tag block into the <head> of each locale's page.
When to use it
- ✓Adding hreflang to a multi-region ecommerce site with en-US, en-GB, en-AU, and de-DE variants.
- ✓Setting up x-default so visitors from unsupported locales see the English fallback.
- ✓Generating the hreflang cluster for a Chinese site with zh-Hans and zh-Hant variants.
- ✓Fixing a site where Google shows the wrong locale in search results due to missing self-reference.
Features
- •Auto-generates the mandatory self-referential hreflang tag for every locale.
- •Validates hreflang code format: en-GB (correct) vs en_GB (wrong), ISO 639-1 language, ISO 3166-1 alpha-2 region.
- •Flags missing x-default, duplicate locale pairs, and non-existent language codes.
- •Bidirectional return-tagging check warns when a locale does not point back to its peers.
- •100% local — no URLs or locale lists leave your browser.
Related tools
Meta Tag Generator
Generate title, description, and social metadata. Free online tool — no sign-up required.
Sitemap Validator
Validate XML sitemaps and inspect URLs. Free online tool — no sign-up required.
Robots.txt Tester
Test whether a page is allowed by robots.txt. Free online tool — no sign-up required.
Open Graph Preview
Preview social cards and generate OG tags. Free online tool — no sign-up required.
Redirect Checker
Follow redirect hops and detect loops. Free online tool — no sign-up required.
HTTP Header Checker
Check the status and response headers of a public web page, including the final URL after redirects.
UTM Builder
Create campaign URLs with UTM parameters. Free online tool — no sign-up required.
Hash Generator
Generate SHA-256, SHA-384, or SHA-512 hashes. Free online tool — no sign-up required.
FAQ
Is the self-referential hreflang tag really required?
Yes. Google's documentation states that each page in an hreflang cluster must reference itself with its own hreflang tag, in addition to referencing all the other locale variants. Omitting the self-reference is one of the most common reasons an entire hreflang cluster is silently ignored.
What is x-default and do I need it?
x-default is the fallback URL Google serves to visitors whose browser locale does not match any of your listed hreflang variants. Google recommends always including it. Without x-default, unmatched visitors may be shown an arbitrary locale or no result at all.
Should I use en-GB or en_GB?
Always use a hyphen: en-GB. The hreflang specification uses ISO 639-1 language code, a hyphen, then ISO 3166-1 alpha-2 region code. Underscore form (en_GB) is invalid and Google will ignore the entire tag. The generator auto-flags underscore codes.
Can I use hreflang for language-only codes like 'en' and 'zh'?
Yes. Language-only codes (en, es, zh-Hans) are valid and act as a catch-all for any region of that language. A common pattern is to list both region-specific (en-GB) and language-wide (en) variants — Google will pick the most specific match first, then fall back to the language-wide one.
Are my URLs and locale lists sent anywhere?
No. The hreflang tags are generated by pure client-side string templating in your browser. No URL, locale code, or form input is transmitted anywhere — verify it in the browser DevTools Network tab.
Does hreflang affect ranking?
It is not a ranking signal itself, but it ensures the right locale URL ranks for the right audience, which improves user engagement metrics that do correlate with ranking. Its main job is routing — making sure a German searcher sees the de-DE page rather than the en-US one, reducing bounce from mismatched locales.