Normalized locale codes
Apply lowercase language, title-case script, and uppercase region formatting consistently.
Start typing to search 227 tools.
Generate a reciprocal hreflang cluster as HTML link tags and a complete same-site XML sitemap, with normalized locales and optional x-default.
Use locales such as en-US, de-DE, fr-CA, or zh-Hant. Each URL must be absolute and unique.
Hreflang Generator converts locale and URL pairs into a reciprocal cluster of rel="alternate" hreflang tags. It also produces a complete XML sitemap block in which every localized URL contains the same alternate set. An optional x-default URL can provide a fallback for unmatched languages or regions.
Each URL must be fully qualified and each localized page should list itself plus every other equivalent version. The generator normalizes casing such as en-us to en-US and zh-hant-tw to zh-Hant-TW. It checks structure and duplicates but cannot verify page content, indexability, response codes, reciprocal deployment, or whether a search engine supports every supplied locale.
locale | absolute URL.Focused controls, predictable output, and a workflow designed around this exact transformation.
Apply lowercase language, title-case script, and uppercase region formatting consistently.
Generate one sitemap URL element for every localized and distinct fallback URL.
Reject repeated locale codes and assigning one localized URL to several locale rows.
Receive HTML head tags and a namespaced XML sitemap cluster from the same source.
Practical details about input, output, privacy, limits, and the best way to use this tool.
Yes. Each language version should list itself and all other versions in the same equivalent-content cluster.
Yes. If one version points to another, the other version should point back. Missing return links can cause annotations to be ignored.
It identifies a fallback URL for users whose language or region is not represented, often a global page or language selector.
No. Alternate URLs must be fully qualified, including the http or https scheme.
No. Hreflang starts with a language code. A script and region may follow, but a country by itself is not a language target.
No. Each indexable localized page normally uses an appropriate self-referencing canonical, while hreflang connects equivalent canonical pages across languages or regions.
Yes. The output contains a complete urlset and repeats the full alternate cluster under each localized URL and distinct x-default URL. For a cross-domain cluster, move each URL element into the sitemap owned by its loc host; the generator adds a warning instead of presenting the combined draft as deployable.
No. Pages must be crawlable, indexable, equivalent, reciprocal, canonicalized correctly, and return successful responses after deployment.
Alphabetical sorting creates a stable tag order without changing locale meaning.
en-US | https://example.com/en-us/product/ uk-UA | https://example.com/uk-ua/product/ pl-PL | https://example.com/pl-pl/product/
\n\n
Casing is normalized after the locale structure and language code are validated.
zh-hant-tw | https://example.com/zh-hant-tw/ sr-latn-rs | https://example.com/sr-latn-rs/
zh-Hant-TW\nsr-Latn-RS
Google requires fully qualified alternate URLs, not root-relative paths.
en-US | /en-us/product/
Error: URL in row 1 must be an absolute HTTP or HTTPS URL.
A cluster contains pages that are genuine language or regional alternatives of the same content. Every version should list itself and every other version. If page A links to page B but page B does not link back, the relationship is incomplete.
Deploy one consistent set across the cluster. Do not add unrelated pages merely because they share a category or template.
Start with a supported two-letter language code such as en, uk, or pl. Add a four-letter script when it matters, as in zh-Hant, and add a two-letter or numeric region after the language or script, as in en-US or zh-Hant-TW.
The generator verifies an ISO 639-1 language code and the structural placement of optional script and region subtags. It does not prove that a particular language-region combination is sensible or supported by every search engine.
The HTML output is the complete set of link elements to place in every localized page head. For URLs on one host, the XML output is a complete namespaced urlset. Each URL element repeats all alternates, including x-default when supplied, so the sitemap implementation is reciprocal rather than a one-page fragment.
Cross-domain hreflang is allowed, but each sitemap can contain only URLs owned by its site. For a multi-host cluster, split the generated URL elements across the appropriate host sitemaps while retaining the complete alternate set. Choose one correctly maintained implementation method; conflicting HTML, HTTP header, and sitemap clusters can drift.
Frequent problems include relative URLs, redirects, 404 responses, blocked or noindex alternatives, missing self-references, missing return links, canonical URLs pointing to another language, and locale tags that do not reflect the visible page language. Generation cannot test those live conditions.
Check each preferred URL with Canonical URL Checker, validate deployed XML with Sitemap Validator, and inspect confusing URL components with URL Parser.
Review Google Search documentation for localized versions and the HTML alternate link definition.