Hreflang Tag Generator

List each language or region version of a page and get the full reciprocal set of hreflang link tags, including x-default, as HTML for the head or as an XML sitemap block. Language and region codes are validated as you type.

  • Instant·Runs in your browser
  • No signup
  • Free

Versions

LangRegionURLx-default
hreflang.html
1<link rel="alternate" hreflang="en" href="https://yoursite.com/" />2<link rel="alternate" hreflang="en-GB" href="https://yoursite.com/uk/" />3<link rel="alternate" hreflang="fr" href="https://yoursite.com/fr/" />4<link rel="alternate" hreflang="x-default" href="https://yoursite.com/" />

Checks

  • Paste the same complete set into every language version, including itself.

  • 3 versions, all reciprocal, x-default set

Next step

All tools
4 steps

How to use it

  1. 1Add one row per version: language code, optional region, and the URL.
  2. 2Choose which URL should be the x-default fallback.
  3. 3Switch between HTML link tags and sitemap XML output.
  4. 4Paste the same complete set into every language version of the page.
FAQ

Frequently asked

An attribute that tells search engines which language and region each version of a page targets, so a French searcher gets the French page instead of the English one. Every version must list all the others, including itself.

The version to show when no language matches. Usually your language selector page or the English version.

ISO 639-1 language codes (en, fr, de) optionally followed by an ISO 3166-1 alpha-2 region (en-GB, fr-CA). Region alone (just GB) is invalid, and so are three-letter codes like eng.
Keep exploring

Publish on a schedule

Want this on autopilot?

Enter your site to see how often ChatGPT, Perplexity, Gemini, and Google cite your brand, and exactly what to publish next.

7-day free trial · Card required · Cancel anytime