# hreflang language and region codes: the reference table

> hreflang language codes are ISO 639-1 two-letter codes, optionally followed by an ISO 3166-1 country code or an ISO 15924 script. A reference of valid codes for Spanish, English and other common languages, the look-alikes Google ignores, and how to choose.

Updated 2026-09-26 · Technical SEO · HTML version: https://getreport.app/guides/hreflang-language-and-region-codes

hreflang language codes follow one pattern: a two-letter ISO 639-1 language code, optionally followed by a hyphen and a two-letter ISO 3166-1 alpha-2 country code (`es`, `es-MX`, `en-GB`), or, for languages written in more than one script, an ISO 15924 script code (`zh-Hant`). The value `x-default` is the only exception. Anything else, including popular codes such as `es-419` and `en-UK`, is not supported by Google, and a set with invalid codes can be ignored. This page is the lookup table: valid codes for Spanish, English and other common languages, the look-alikes that fail, and how to decide between language-only and language-country codes. It belongs to our guide to [international SEO: site structure, hreflang and language targeting](https://getreport.app/guides/international-seo).

## Quick answer

- **Format:** `language`, `language-COUNTRY` or `language-Script`, joined with a hyphen, never an underscore.
- **Language:** ISO 639-1, two letters: `en`, `es`, `de`, `ja`, `zh`.
- **Country:** ISO 3166-1 alpha-2, two letters: `GB` (not `UK`), `MX`, `AT`.
- **Script:** ISO 15924, four letters: `Hans`, `Hant`, `Latn`, `Cyrl`.
- **Never a country alone.** `hreflang="de"` means German; there is no way to say "Germany" without a language.
- **Unsupported:** `es-419` (Latin America), `en-UK`, `en-EU`, `jp`, `cn`, `en_GB`.
- Build sets with the free [hreflang generator](https://getreport.app/tools/hreflang-generator), which names each code as you type and flags common mistakes.

## The format Google supports

Google's [localized versions documentation](https://developers.google.com/search/docs/specialty/international/localized-versions) defines the value of the `hreflang` attribute:

| Part | Standard | Letters | Examples | Required? |
| --- | --- | --- | --- | --- |
| Language | ISO 639-1 | 2 | `en`, `es`, `pt`, `zh` | Yes |
| Script | ISO 15924 | 4 | `Hans`, `Hant`, `Latn`, `Cyrl` | Optional |
| Region | ISO 3166-1 alpha-2 | 2 | `US`, `GB`, `MX`, `BR` | Optional |
| Fallback | – | – | `x-default` | Optional, once per set |

Order matters: language first, then script, then region (`zh-Hant-TW`). Case does not: `en-gb` and `en-GB` are read the same way, but the convention is lowercase language, capitalised script and uppercase region, and a consistent style makes mistakes easier to spot.

The [complete hreflang reference](https://getreport.app/guides/hreflang-tags) covers where the tags go and how to implement a set; this page is only about the codes.

## Language-only or language-country?

Use a **language-only** code when one version serves every speaker of that language, wherever they are: `de` for a German translation, `fr` for French. That is the right default for most sites, because it matches every searcher who reads the language.

Use a **language-country** code only where something real differs by country: price and currency, stock and delivery, legal terms, or spelling and vocabulary your visitors notice. `de-DE`, `de-AT` and `de-CH` make sense for a shop with three price lists; they add nothing for a blog.

You can mix them. A common pattern is a general version plus local ones:

```html
<link rel="alternate" hreflang="es" href="https://example.com/es/">
<link rel="alternate" hreflang="es-ES" href="https://example.com/es-es/">
<link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">
```

Here Spanish speakers in Spain and Mexico get their local pages, and Spanish speakers anywhere else (Argentina, Colombia, the US) get the general `es` page. Google matches the most specific code first and falls back to the language-only code, so a language-only entry is a useful catch-all whenever you also have country versions.

## Spanish hreflang codes

Spanish is where most code mistakes happen, because "Latin America" is a common target and has no ISO country code.

| You want to target | Use | Not |
| --- | --- | --- |
| Spanish speakers everywhere | `es` | – |
| Spain | `es-ES` | `es-SP`, `sp` |
| Mexico | `es-MX` | `mx` |
| United States (Spanish speakers) | `es-US` | `es-USA` |
| Argentina | `es-AR` | `ar` (that is Arabic) |
| Colombia | `es-CO` | `co` (that is Corsican) |
| Chile | `es-CL` | `cl` |
| Peru | `es-PE` | `pe` |
| Latin America as a whole | `es`, or one code per country | `es-419`, `es-LA`, `es-LATAM` |

**Why `es-419` fails.** `419` is a UN M.49 area code for Latin America and the Caribbean. It is valid in the general BCP 47 language-tag standard, and browsers understand it, but Google's hreflang support is limited to ISO 3166-1 alpha-2 regions, so it does not support `es-419`.

**Why `es-LA` is worse.** `LA` is a valid ISO country code, for Laos. `es-LA` does not fail quietly; it targets Spanish speakers in Laos.

For one Latin American Spanish version, use `es` for it (and `es-ES` for a separate Spain version if you have one), or list the same URL under each country code you care about: `es-MX`, `es-AR`, `es-CO`, `es-CL` and so on. Listing one URL under several codes is allowed.

## English hreflang codes

| You want to target | Use | Not |
| --- | --- | --- |
| English speakers everywhere | `en` | – |
| United Kingdom | `en-GB` | `en-UK`, `uk` (that is Ukrainian) |
| United States | `en-US` | `en-USA` |
| Ireland | `en-IE` | `en-IR` (IR is Iran) |
| Canada | `en-CA` | `ca` (that is Catalan) |
| Australia | `en-AU` | – |
| New Zealand | `en-NZ` | – |
| India | `en-IN` | – |
| South Africa | `en-ZA` | `en-SA` (SA is Saudi Arabia) |
| Europe as a whole | `en`, or one code per country | `en-EU` |

`UK` and `EU` are "exceptionally reserved" codes in ISO 3166-1, not assigned country codes, and Google does not support them. `en-GB` covers England, Scotland, Wales and Northern Ireland.

A frequent set is `en-US`, `en-GB` and `en` as the catch-all for every other English speaker, often with `x-default` pointing at the same page as `en`. Same-language regional pages tend to be near duplicates; [hreflang and canonical tags](https://getreport.app/guides/hreflang-and-canonical-tags) explains how to keep them from being folded together.

## Other common languages and their pitfalls

| Language | Code | Frequent mistake | Why it is wrong |
| --- | --- | --- | --- |
| Japanese | `ja` | `jp` | JP is the country; the language is `ja` |
| Chinese | `zh`, `zh-Hans`, `zh-Hant` | `cn`, `zh-CHS` | CN is the country; `zh-CHS` is an old Microsoft code |
| Korean | `ko` | `kr` | KR is the country; `kr` is Kanuri |
| Greek | `el` | `gr` | GR is the country |
| Danish | `da` | `dk` | DK is the country |
| Swedish | `sv` | `se` | SE is the country; `se` is Northern Sami |
| Czech | `cs` | `cz` | CZ is the country |
| Ukrainian | `uk` | `ua` | UA is the country |
| Estonian | `et` | `ee` | EE is the country; `ee` is Ewe |
| Slovenian | `sl` | `si` | SI is the country; `si` is Sinhala |
| Hebrew | `he` | `il` | IL is the country |
| Norwegian | `no`, `nb` or `nn` | – | `nb` (Bokmål) and `nn` (Nynorsk) are more specific |
| Portuguese (Brazil) | `pt-BR` | `br`, `pt-BZ` | `br` is Breton; BZ is Belize |
| Portuguese (Portugal) | `pt-PT` | `pt-PO` | PO is not a country code |
| Serbian (Latin script) | `sr-Latn` | `sr-LT` | LT is Lithuania |
| German (Switzerland) | `de-CH` | `de-SZ` | SZ is Eswatini |

The pattern behind most of these: a country code used where the language code belongs. Country and language codes often match (`de`/`DE`, `fr`/`FR`, `it`/`IT`), which makes it easy to assume they always do.

### Chinese: script or region?

Chinese can be targeted by writing system or by place:

- `zh-Hans`: Simplified Chinese, for readers anywhere who use it.
- `zh-Hant`: Traditional Chinese, for readers anywhere who use it.
- `zh-CN`, `zh-TW`, `zh-HK`, `zh-SG`: Chinese for one country or territory.
- `zh-Hant-HK`: Traditional Chinese in Hong Kong, when you need both.

If your Chinese versions differ by script and not by market, the script codes are the more accurate choice.

## Codes that are always invalid

| Code | Problem | Use instead |
| --- | --- | --- |
| `en_GB` | Underscore | `en-GB` |
| `de` meant as "Germany" | A country without a language is impossible | `de-DE` (German in Germany) |
| `GB`, `US`, `MX` on their own | Country only | `en-GB`, `en-US`, `es-MX` |
| `eng`, `spa`, `deu` | Three-letter ISO 639-2/3 codes | `en`, `es`, `de` |
| `en-GBR`, `es-USA` | Three-letter country codes | `en-GB`, `es-US` |
| `es-419` | UN M.49 area code | `es` or per-country codes |
| `x-default` twice | Only one fallback per set | One `x-default` |

## How to check your codes

The hreflang generator validates each code before you copy anything:

> **Free tool:** [Hreflang generator: tags, sitemap or headers](https://getreport.app/tools/hreflang-generator): Free hreflang generator. Paste your language versions and get complete hreflang tags, an XML sitemap or HTTP headers, codes checked. Runs in your browser.

It checks that the language is a two-letter ISO 639-1 code, the region a two-letter ISO 3166-1 country code and an optional script four letters, and names the result ("German (Austria)", "Chinese (Hant)"). It flags underscores, three-letter languages, country codes in the language position and look-alikes such as `en-UK`, `es-419` and `es-LA`, with the likely intended code where there is one.

To check a live page, run the hreflang checker:

> **Free tool:** [Hreflang checker: validate your hreflang tags](https://getreport.app/tools/hreflang-checker): Free hreflang checker: validate the hreflang tags of a page and fetch every alternate to confirm it links back, with invalid codes and dead alternates listed.

It reads every hreflang tag on the page, checks that each code has the right shape (language first, hyphen-separated, no underscores), that the set has at most one `x-default`, no repeated codes and a self-reference, and then fetches the alternates to confirm the return links. The shape check does not look codes up in the ISO lists, so a well-formed but wrong code such as `en-UK` passes it; paste your codes into the generator to catch those.

> **Check: hreflang tags are complete and valid.** hreflang tells Google which language or country version to show each searcher. A missing self-reference or an invalid code makes the whole set ignored, so visitors land on the wrong version.
>
> 1. Use valid codes (language, optionally a region; for example "en", "en-GB", "de-AT") and at most one "x-default".
> 2. Include this page's own URL in its hreflang set, and list the same set on every version.

The `lang` attribute on each page's `<html>` element should match its hreflang code. Google does not use it for targeting, but screen readers and browsers do, and a mismatch is a quick sign that a template is wrong.

> **Check: The <html> element declares its language.** The lang attribute tells search engines and translation tools which language the page is in, and lets screen readers pick the right pronunciation.
>
> 1. Add lang to the html element, for example <html lang="hr"> or <html lang="en-GB">.
> 2. In WordPress the theme prints it from Settings → General → Site Language.

## Questions people ask

### What is the hreflang code for Latin American Spanish?

There is no supported single code. `es-419` uses a UN M.49 area code that Google's hreflang does not support, and `es-LA` targets Laos. Use `es` for a Latin American Spanish version that serves all Spanish speakers, and `es-ES` for a separate Spain version if you have one. Or list the same URL under each country code you target, such as `es-MX`, `es-AR` and `es-CO`.

### Should I use en or en-US in hreflang?

Use `en` unless you have separate English versions for different countries. `en` matches every English speaker, wherever they are. If you have a US and a UK version, use `en-US` and `en-GB`, and add `en` pointing at one of them, or at an international version, to catch English speakers in all other countries. Many sites point `x-default` at the same page as `en`.

### Can I use a country code alone in hreflang?

No. The first part of every hreflang value must be a language, and Google does not derive a language from a country. `hreflang="mx"` is not "Mexico"; `mx` is not a valid language code, so the entry is ignored. Write the language that page is in, followed by the country: `es-MX` for Spanish in Mexico, `en-CA` or `fr-CA` for Canada.

### Is hreflang en-UK valid?

No. The ISO 3166-1 code for the United Kingdom is `GB`, so the correct value is `en-GB`. `UK` is only an exceptionally reserved code in the standard, and Google does not support it in hreflang. Because the tag looks right and nothing on the page breaks, `en-UK` often survives for years; search your templates and sitemaps for it and replace every occurrence.
