Skip to content

Hreflang generator

Connect equivalent language or country versions of a page. Generate complete HTML tags, HTTP Link headers and XML sitemaps from your supplied URLs.

Equivalent page versions

One cluster of pages for different languages or countries.

Use 2–50 localized versions of the same content. Codes: en, en-GB, zh-Hans or zh-Hans-US. Country-only codes and different city service pages are not a hreflang cluster.

Version 1
Version 2

Use complete HTTP or HTTPS page URLs, up to 4,000 characters each and 20,000 across active codes and URLs. Each code must be unique; different codes may intentionally share one URL.

2 of 50 versions

Optional page for unmatched languages, such as your language selector. It can share a URL with a localized version.

Where to use the output

Choose one implementation method. Add the same HTML tags inside the head of every equivalent page, including each page’s own URL. Or configure the identical Link response header for each version.

For XML, select and download the sitemap for each origin. Each file lists that origin’s unique page URLs, with the complete alternate set under every entry. Upload at the site root or an appropriate directory; merge carefully with an existing sitemap.

This generator includes return annotations in its output. It does not check whether they are installed on your pages, whether the pages are translated, or whether their canonical URLs and indexing settings agree.

Generation runs in your browser with bundled code lists. No AI, paid API, website fetch or remote validation. Entries disappear on reload or Clear; copying and downloads are explicit exports.

Use equivalent language or country versions
Hreflang describes localized versions of the same content. It does not replace canonical tags or create translations, and it is not a way to target different cities. Google’s hreflang guidance.

Your hreflang annotations

Review the complete output before adding it to your website.

Enter at least two equivalent page URLs and their language codes. Generate to see HTML tags, an HTTP Link header and an XML sitemap for each origin.

Include the current page in the list. Complete every row or remove it; repeated language codes block generation. Add x-default only when you know the fallback URL.

Formatting annotations in the browser

Your browser checks supplied values against bundled language, script and country-code lists, normalizes URLs and escapes the output. It repeats the complete alternate set so each listed page includes itself and its counterparts.

URLs remain text; no website is fetched and no language or translation is inferred. Code checks use a bundled snapshot of the IANA language registry, with reserved and private-use regions excluded. Verify the actual pages and implementation before publishing.