Language and Locale Code Lookup
Find the right code for a language, combine it with a script and region into a correct locale tag, and see how software will format text for it.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Search a language
By name or code.
- 2Note the codes
639-1, 639-2/T, 639-2/B.
- 3Build a tag
Language, script, region.
- 4Check the canonical form
And the likely subtags.
- 5Preview formats
Dates, numbers, currency.
- 6Use the tag
In HTML, hreflang or your app.
About this tool
Software identifies languages with codes, and there are several systems. ISO 639-1 gives two-letter codes such as en, de and bn. ISO 639-2 gives three-letter codes, in two versions for about twenty languages: the terminology code deu and the older bibliographic code ger for German, for example. ISO 639-3 adds thousands of languages such as Cantonese (yue) and Filipino (fil). Websites, apps and operating systems combine these with script and region codes into BCP 47 locale tags such as pt-BR, zh-Hant-TW or sr-Latn. This tool brings it together. Search more than 190 languages by name or any code to see their English and native names, all three code forms and the writing direction. Then build a locale tag from a language, an optional script and a region: the tool checks and canonicalises it, shows the likely-subtags expansion and the shortest form, and previews how your browser formats dates, times, numbers, currency, percentages, lists, relative times and plural categories in that locale.
Anatomy of a locale tag
- Language: two or three letters, always lower case, such as fr or yue. - Script: four letters, title case, such as Latn, Cyrl, Hans or Hant. Needed when a language is written in more than one script. - Region: two letters (ISO 3166) or three digits (UN M.49), such as GB, BR or 419 for Latin America. Tags are case-insensitive, but this conventional casing is easiest to read.
Which code to use
Use the shortest valid code: the two-letter code when one exists, otherwise the three-letter code. Prefer language-only tags unless regional differences matter for your content, such as spelling (en-GB and en-US) or vocabulary (pt-PT and pt-BR). Use the 639-2/B codes only where a system such as MARC library records demands them.
Where tags are used
- The HTML lang attribute, which affects screen reader pronunciation, hyphenation and spell checking. - hreflang annotations that tell search engines which page serves which audience. - The Accept-Language header browsers send and servers use to choose a language. - The Intl APIs in JavaScript and similar libraries in other languages.
Locale data
The preview uses the Unicode CLDR data built into your browser, the same data most operating systems and apps use. It shows, for example, that German writes 1.234.567,891 and that Arabic has six plural categories while English has two.
Limits
Language names and formats come from your browser, so very old browsers may show codes instead of names. The list covers all ISO 639-1 languages and a selection of common three-letter-only languages, not the full ISO 639-3 set.
Worked example
Searching German shows codes de, deu and ger with the native name Deutsch; building language pt with region BR gives pt-BR, which maximises to pt-Latn-BR and formats the number 1234567.891 as 1.234.567,891 and 29 October 2026 as quinta-feira, 29 de outubro de 2026.
Quick facts
- Category: Developer & Data
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: IETF BCP 47 (RFC 5646) and ISO 639
Frequently asked questions
What is the difference between 639-1 and 639-2?
639-1 has two-letter codes for major languages; 639-2 has three-letter codes for many more.
Why are there two three-letter codes for French?
fra is the terminology code; fre is the older bibliographic code used by libraries.
When do I add a script?
When a language uses several scripts, such as Serbian (Latn or Cyrl) or Chinese (Hans or Hant).
Is en-UK correct?
No. The region code for the United Kingdom is GB, so use en-GB.
Where should I put the tag?
In the html element's lang attribute, hreflang links and your app's locale setting.
Is anything uploaded?
No. Lookups and previews run in your browser.
