Language Codes vs Region Codes: What's the Difference?

You've seen codes like en, en-US, and en-GB scattered across hreflang tags, CMS language settings, and URL folders, and they all look close enough to be interchangeable. They're not. Two different standards are quietly stacked on top of each other here, and mixing them up is one of the most common — and most invisible — mistakes in international SEO.

Get this wrong and nothing crashes. There's no error message. Your site just quietly serves the wrong version of a page to the wrong audience, or search engines ignore your targeting entirely because the code you used doesn't exist.

Quick Answer

A language code (like en or fr) says what language content is written in. A region code (like US or FR) says which country or territory it targets. Combined with a hyphen, like en-US or fr-CA, they form a locale code that captures both at once. Language codes come from ISO 639-1; region codes come from ISO 3166-1 — two separate standards, not one.

What are language codes and region codes?

These are two unrelated classification systems that happen to get combined constantly on the web, which is exactly why they're so easy to confuse.

The practical takeaway: whenever you see a two-letter code, check whether it's describing a language, a place, or both stitched together — they're never the same thing wearing a different label.

Why the distinction matters for your site

This isn't a pedantic naming issue. Getting it right — or wrong — has direct, measurable effects on how your site performs internationally:

📊 Quick stat A large share of hreflang errors flagged in Search Console aren't broken syntax — they're valid-looking codes that don't exist, like using UK instead of the correct region code GB.

Step-by-step: choosing the right codes

  1. Identify the language the content is actually written in. Not the language you assume your audience speaks — the actual language of the words on the page.
  2. Decide whether region matters. If the content is identical for every country that speaks that language, you may only need a language code, like en, with no region attached.
  3. Identify the specific region, if it does matter. Use the two-letter ISO 3166-1 country code, not a colloquial abbreviation — GB, not UK; KR, not Korea.
  4. Combine them into a locale code. Format it as language-REGION in lowercase-uppercase, such as en-US, fr-CA, or pt-BR.
  5. Apply it consistently across the site. Use the same code in the html lang attribute, hreflang tags, and any URL structure or CMS locale setting for that page.
  6. Add an x-default, if relevant. If you have a fallback page for visitors who don't match any specific language-region pair, mark it with x-default in your hreflang set.
  7. Validate the final set. Check that every code used actually exists in the ISO standards and that no two tags accidentally point to the same combination.
Try the Rebrixe Hreflang Code Generator — free Get ready-to-paste hreflang tags.
Generate Codes →

Common mistakes with language and region codes

1. Using "UK" instead of "GB"

UK is the everyday abbreviation everyone uses in conversation, but it isn't a valid ISO 3166-1 region code. The correct code for the United Kingdom is GB, and using UK in an hreflang or locale attribute can cause it to be ignored.

2. Treating a region code as if it implies a language

BR means Brazil, not "Portuguese." A code like BR on its own says nothing about language — it needs to be paired with pt to mean Brazilian Portuguese specifically.

3. Mismatching language and region without meaning to

A code like en-FR is syntactically valid and means "English content for visitors in France," which is rarely the intended target — this kind of typo is easy to make and easy to miss.

4. Using one generic code when regional differences actually exist

Publishing US-specific pricing or spelling under a bare en tag, with no region distinction, can send the wrong version to UK or Australian visitors who search engines assumed were covered by the same generic tag.

💡 Pro tip When in doubt about a region's correct code, check the ISO 3166-1 list directly rather than guessing from the country's common abbreviation — several everyday abbreviations (UK, Holland) don't match the official two-letter code.

Real-world examples

How the same language splits into different locale codes depending on the region it's targeting:

English
en-US vs en-GB
Same language
Different spelling ("color" vs "colour"), date format, and currency, despite an identical language code.
Spanish
es-ES vs es-MX
Different vocabulary
European and Latin American Spanish diverge in word choice and formality, even sharing the same base language code.
Chinese
zh-CN vs zh-TW
Different script
Mainland China typically uses simplified characters, while Taiwan uses traditional — a region code that changes the actual script used.
Portuguese
pt-PT vs pt-BR
Different spelling rules
European and Brazilian Portuguese differ enough in spelling and grammar that publishers maintain separate versions.

In each case, the language code alone would have left out a distinction that genuinely matters to the reader — the region code is doing real work, not just adding decoration.

Language codes vs region codes compared

A side-by-side look at what each standard actually covers, so it's clear which one to reach for.

Aspect Language code (ISO 639-1) Region code (ISO 3166-1)
What it identifies The language of the content The country or territory targeted
Format Two lowercase letters, e.g. en, fr, ja Two uppercase letters, e.g. US, GB, BR
Used alone for Content identical across every region Rarely used alone in web targeting
Common pitfall Assuming one language code covers every regional variant Using a colloquial abbreviation (UK) instead of the real code (GB)
Typically combined into A locale code, e.g. en-US, fr-CA, pt-BR

Generate valid locale and hreflang codes right now — free

The Rebrixe Locale & Hreflang Code Generator checks your language and region choices against the ISO standards and outputs ready-to-paste hreflang tags and html lang attributes. No guessing whether "UK" or "GB" is correct — just pick from a validated list.

Free Hreflang Code Generator Get ready-to-paste hreflang tags.
Open Code Generator →

Frequently asked questions

A language code (ISO 639-1, like en or fr) identifies what language the content is written in. A region code (ISO 3166-1, like US or FR) identifies a country or territory. Neither one tells you the other — English is spoken in dozens of regions, and a single region can have several official languages.
A locale code combines a language code and a region code, separated by a hyphen, like en-US or pt-BR. It tells software or search engines both the language and the regional variant, which matters for spelling, currency, date formats, and content targeting.
No. The correct ISO 3166-1 region code for the United Kingdom is GB, not UK. "UK" is commonly used in everyday writing but isn't the standard code, and using it in an hreflang or locale attribute can cause validation errors or be silently ignored.
Not necessarily. If your content works for every English-speaking visitor regardless of country, a language-only code like en is enough. A region code is only needed when the content itself changes by country, such as different pricing, spelling, or legal text.
Yes. Canada, for example, uses both en-CA and fr-CA because the country has two official languages. Switzerland similarly needs separate codes for German, French, Italian, and Romansh content aimed at Swiss visitors.
It's technically valid syntax, since it just means "English content for visitors in France," but it's rarely what a site actually means to say. Search engines and browsers will interpret it literally, so an accidental mismatch can send the wrong page to the wrong audience.
The most common spots are the html lang attribute, hreflang tags for international SEO, URL structures like /en-us/ or /fr-ca/, and content management settings that control which translated version of a page is served to a visitor.

Generate valid hreflang codes in seconds

The Rebrixe Hreflang Code Generator creates perfect codes. No signups , No accounts , No tracking

Launch the Code Generator →
← Back to blogs