# Language code (ISO 639-1)

Category: [International SEO](https://seo-geo-glossary.com/en/glossary/category/international-seo/) › [hreflang & language tags](https://seo-geo-glossary.com/en/glossary/category/international-seo/hreflang-language-tags/) · Also known as: ISO 639-1

A **language code**, in web and SEO use, is a short identifier for a language, usually the two-letter code from ISO 639-1 such as `de`, `en` or `fr`. It appears in hreflang annotations, in the `lang` attribute and in language tags.

## How is a language code built?

On the web, language tags follow BCP 47, published as RFC 5646. A tag consists of a language subtag and optional further subtags for script and region. For languages that have a two-letter ISO 639-1 code, only that code is defined in the IANA registry. The RFC recommends lowercase for language codes, a capitalized first letter for script codes such as `Cyrl`, and uppercase for region codes. Tags are treated as case insensitive.

Google's hreflang format takes the language code in ISO 639-1 format followed by an optional region code in ISO 3166-1 Alpha 2 format. Specifying the region alone is not valid. Google adds that it does not rely on code-level language attributes to determine a page's language, so the visible content has to be in that language.

## Examples

| Value | Meaning |
|---|---|
| `de` | German |
| `en-GB` | English for users in the United Kingdom |
| `zh-Hant` | Chinese in Traditional script |
| `zh-Hans-US` | Simplified Chinese for users in the US |

```html
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/" />
```

## Common mistakes

- Using a region alone, such as `GB`, in hreflang. Google calls this invalid.
- Using `UK` for the United Kingdom. Google ignores it, and the region code is `GB`.
- Using `EU` or `UN`, which Google ignores as reserved values.

## FAQ

**What is the difference between a language code and a country code?**
A language code names the language and a country code names the region. In hreflang the language code comes first and the region follows.

**Is a language code without a region enough?**
Yes. `de` is valid and covers German in general.

## Related terms

- [Country code (ISO 3166-1)](https://seo-geo-glossary.com/en/glossary/country-code/index.md)
- [hreflang](https://seo-geo-glossary.com/en/glossary/hreflang/index.md)
- [HTML lang attribute](https://seo-geo-glossary.com/en/glossary/html-lang-attribute/index.md)
- [Content-Language header](https://seo-geo-glossary.com/en/glossary/content-language-header/index.md)

## Sources

- [Tell Google about localized versions of your page – Google Search Central (updated 21.09.2026)](https://developers.google.com/search/docs/specialty/international/localized-versions)
- [RFC 5646 – Tags for Identifying Languages (BCP 47), September 2009](https://www.rfc-editor.org/rfc/rfc5646.html)
- [Managing multi-regional and multilingual sites – Google Search Central](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites)
- [ISO 639-1 – Wikipedia (secondary)](https://en.wikipedia.org/wiki/ISO_639-1)

---

Last updated: October 7, 2026
URL: https://seo-geo-glossary.com/en/glossary/language-code/
