hreflang Tag Generator

International SEO lives or dies on correct hreflang annotations. When you run the same page in multiple languages or regional variants, hreflang tells Google which version to show to which audience, so a visitor in Spain sees your Spanish page and a visitor in the UK sees the English one. Get it wrong and the wrong language version can rank — or worse, your pages can cannibalize each other. Our free hreflang Tag Generator builds the exact <link rel="alternate"> tags you need, no signup or account required.

Enter each language or region code together with its matching page URL, and the tool validates every code against the correct ISO pattern (two lowercase letters for the language, an optional uppercase region suffix like en-GB). You can also add an x-default row for the fallback page shown to users whose language you do not target explicitly. With one click you get clean, standards-compliant tags you can paste straight into your page’s <head> section.

It is ideal for website owners, bloggers and SEO specialists who manage multilingual or multi-regional sites and want to avoid the tedious hand-editing that usually causes syntax errors. Everything happens in your browser, instantly.

hreflang Tag Generator

Add one row per language/region version of your page, then generate ready-to-paste hreflang tags.

How to use

  1. Each row represents one language or region version: type the hreflang code (for example en, en-GB, fr) and the full URL of that page version.
  2. Click “Add row” to create as many rows as you need; remove any row with its delete button.
  3. Tick the x-default option if you want a fallback URL for unmatched visitors.
  4. Click “Validate and Generate” — the tool checks every code against the correct pattern and flags any mistakes.
  5. Copy the generated <link> lines or download them as an .html file, then paste them into the <head> of every language version of the page.
  6. Remember: hreflang works in sets — include tags for every version on every version.

FAQs

What is the difference between en and en-GB in hreflang?

en targets the English language everywhere, while en-GB targets English speakers specifically in the United Kingdom. Use the plain language code when you have one version per language, and add the region suffix when you have separate versions per country.

What does x-default do?

x-default marks the fallback page shown to users whose language or location does not match any of your targeted versions — often a language-selector page or your main homepage.

Where do I paste the generated tags?

Inside the <head> section of your HTML, on every language/region version of the page. Each version must list itself plus all the other versions, so every page in the set carries the full tag set.