---
title: Free hreflang Tag Generator (2026)
slug: hreflang-generator
last_reviewed: 2026-06-30
author: editorial
source: LemAudit Free Tools
---

## Intro

`hreflang` is the most error-prone tag in international SEO. It tells Google which page to serve to which language and region, and it has three rules that look simple and bite hard in practice:

1. **Every variant must list every other variant**, including itself. If your German page lists the English page but the English page doesn't list the German page back, Google ignores the whole cluster.
2. **Language and region codes must be valid.** ISO 639-1 for language (lowercase, two letters), ISO 3166-1 alpha-2 for region (uppercase, two letters). `en-uk` is invalid; `en-GB` is correct (because the country code is GB, not UK).
3. **There should be an `x-default`.** This is the page Google serves when no other variant matches the user's language. Without it, users in Spanish-speaking markets you don't target see whatever Google thinks is the closest match — often wrong.

This generator handles all three. Paste your `lang-REGION | URL` pairs into the textarea, pick whether you want the `<link>` tag version (for `<head>`) or the sitemap XML version (for `sitemap.xml`), and we'll generate reciprocal links between every pair, validate the language codes, normalize the casing, and warn you if `x-default` is missing.

The sitemap XML output is what most international sites actually use in production. Repeating dozens of `<link>` tags in every page's `<head>` is a maintenance nightmare. Defining them once in a sitemap is the standard pattern for large multi-language sites — Google supports both equally.

## When not to use this

Don't use `hreflang` to differentiate pages that aren't actually translations or regional variants of the same content. If your "US" and "UK" pages have different products, different pricing, different layouts — they're different pages, not `hreflang` variants. Tagging them as alternates can cause Google to swap them at the SERP level in confusing ways.

Don't use `hreflang` as a fix for thin translations. If your "Spanish" version is auto-translated boilerplate with the same product names in English, Google's quality filters will demote the Spanish variant regardless of `hreflang`. Fix the content first.

Don't use `hreflang` when a canonical tag would do the job. Two pages with substantially the same English content in different regions (US vs UK with the same SKUs) often work better as a canonical-tag pair — one canonical, two URLs with `Vary: Accept-Language`. We have a [canonical tag generator](/tools/canonical-tag-generator) for that case.

## FAQ

### What's the difference between `en` and `en-US`?

`en` targets all English speakers regardless of region. `en-US` targets English speakers in the United States specifically. If you have one English page that serves everyone, use `en`. If you have a US version and a UK version, use `en-US` and `en-GB`. Don't mix — if you use `en-US`, also use `en-GB` (or `en` as a fallback) for British users.

### Why does the sitemap XML repeat every URL?

Because each page in the cluster needs to list every alternate, including itself. In a `<head>` implementation you'd repeat the same block in every page; the sitemap version is the same data in one file. There's no shortcut — Google requires the reciprocal listing.

### What about the `region` attribute by itself, like `hreflang="us"`?

That's invalid. `hreflang` accepts language alone (`en`), or language-region (`en-US`). Region alone is not a supported value. Our generator will warn you and skip lines like that.

### Does Google use `hreflang` for SEO ranking?

`hreflang` doesn't change rankings — it changes which URL Google serves to which user. A page with 1000 backlinks will still rank for its target market; `hreflang` just makes sure the right language version appears.

### Should I include `hreflang` on a single-language site?

No. If you only serve one language to one region, `hreflang` does nothing for you. Add it the first time you launch a translated or regional variant.

### Can I use this for region-only differences (USD vs GBP)?

Yes, but with a caveat: if the content is mostly identical and only currency differs, consider using one URL with currency switching via cookie or query string, and a single canonical tag. `hreflang` works for that case but is overkill.
