Skip to main content

Hreflang Generator

Hreflang Generator builds the alternate-language annotations Google uses, in your browser.

Language alternatives

Examples
Warnings
  • No x-default entry. Adding one is recommended so unmatched users get a fallback page.

Each alternate page should return the same hreflang set. This tool works from a single set on your device and cannot check that other pages link back — that needs a crawl.

HTML link tags
<link rel="alternate" hreflang="en" href="https://example.com/">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/">
Processed locally in your browser

How to use it

  1. Add one row per language version with its hreflang value and absolute URL
  2. Review the per-row and set-level errors and warnings
  3. Optionally set the current page URL and turn on the XML sitemap snippet
  4. Copy the HTML tags, copy the XML snippet, or download the CSV checklist

Add one row per language version — a hreflang value and its absolute URL — and the tool validates each one: hreflang syntax (a language code like en, a language-REGION code like en-US, or x-default) and http:// or https:// URLs only. Values are normalised to lowercase language and uppercase region, so EN-us becomes en-US; a plainly invalid value is never guessed at. Local checks flag duplicate hreflang values and more than one x-default as errors, and surface warnings for a missing x-default, a URL reused for several languages, only one alternate, a #fragment, or mixed schemes and hosts. An optional Current page URL field checks that the page references itself. It generates the <link rel="alternate"> tags in your row order, an optional XML sitemap snippet with the xhtml namespace note, and a CSV checklist. It cannot confirm that the other pages return the same hreflang set — that needs a crawl — so it only offers guidance, and it never fetches anything. Unlike the Meta Tag Generator, which produces title and description tags, and unlike a sitemap generator, which lists a site's URLs, this tool only describes the relationships between one page's language versions. Everything runs locally; your URLs are never sent anywhere.

FAQ

We use cookies to run this site and, with your consent, to understand usage and personalize ads. You can change your choice at any time.