TontonTools

Hreflang Tag Generator

Generate hreflang tags for multilingual sites — correct pairs, no typos.

100% Free No signup Privacy-friendly SEO Tools
Updated Sep 2026
Share X / Twitter Facebook LinkedIn WhatsApp

How to use Hreflang Tag Generator

  1. Enter language | URL pairs, one per line — every version of the page, including the original.
  2. Add an x-default line pointing to your primary version as the fallback.
  3. Copy the generated tags into the <head> of every version of the page — the identical block on each.
  4. Verify reciprocity after deploying: Search Console's International Targeting report flags missing return tags.

What is Hreflang Tag Generator?

An hreflang generator builds the <link rel="alternate" hreflang="…"> tags that tell Google which language versions of a page exist and who should see which: a French searcher gets /fr/, a German searcher /de/, instead of everyone landing on English.

Each tag pairs a language code with that version's URL: <link rel="alternate" hreflang="es" href="https://example.com/es/" />. Codes are ISO language (es), optionally with a region (es-MX for Mexican Spanish), plus the special x-default for the fallback version. The syntax is finicky — wrong codes (the classic: "uk" is Ukrainian, not United Kingdom — Britain is "gb") and mismatched URLs silently void the whole setup — which is why generating beats typing.

About the Hreflang Tag Generator

Enter your language-and-URL pairs, one per line (like es | https://example.com/es/), and copy the generated tag block for your pages' <head>.

The two rules that make hreflang work: every version lists ALL versions including itself — the self-referencing entry is required; and tags must be reciprocal — if the English page points to the Spanish, the Spanish must point back, or Google ignores the pair ("return tag" errors in Search Console are exactly this). Add an x-default entry pointing at your primary version to catch searchers whose language you don't serve.

The same annotations can live in your XML sitemap instead of page heads (better for large sites — one file to maintain). Either location works; don't mix conflicting sets. Combined with translated content and self-referencing canonicals per version, this is the complete recipe for multilingual SEO.

Frequently Asked Questions

The annotation that maps language versions of the same page so Google serves each searcher the right one. You need it the moment the same content exists in more than one language or regional variant — without it, versions compete and the wrong one ranks.
It names the fallback page for searchers matching none of your languages — usually your primary version or a language-selector page. One x-default per set, alongside the language entries.
Hreflang must be mutual: page A pointing to B counts only if B points back to A. The error means one side of the pair is missing the reciprocal tag — deploying the identical full block on every version prevents it.
en-GB and pt-BR — ISO 639-1 language plus ISO 3166-1 region. The infamous trap: "uk" alone means Ukrainian. Language-only codes (es, fr) are fine when you don't need regional targeting.
Either works — heads are simpler for small sites; sitemap xhtml:link entries scale better for hundreds of pages (one file to regenerate). Pick one location and keep it consistent; conflicting sets confuse Google.

We use cookies for analytics and to keep the tools free via ads. See our Privacy Policy.