ISO 639-1 Language Code Validator
Check whether text is a valid ISO 639-1 language code as you type it, right in your browser, without sending it anywhere.
Input
Output
No value
Guide
What is an ISO 639-1 language code?
ISO 639-1 gives the world's major languages a code of two small letters: en for English, fr for French, de for German, ja for Japanese, zh for Chinese. These codes show up in web addresses like /fr/, in the lang attribute of web pages, in app translation files, in subtitle file names and at the start of locale codes such as en-US. ISO sets the codes, and the Library of Congress publishes them in its list of the three-letter ISO 639-2 codes.
Developers, translators and content editors check a code before it goes into a translation file, a language menu or a database, since a slip such as a country code in place of a language code quietly breaks the language setting.
Tool description
Type or paste a code into the ISO 639-1 language code field, and the result shows as you type: "ISO 639-1 language code is valid" or "ISO 639-1 language code is not valid". Spaces and line breaks around the code are ignored. The page has no settings.
What passes and what fails
- Two small letters from the ISO 639-1 list:
fr,es, orelfor Greek - Capital letters fail:
FRandFrdon't pass, though some systems write codes that way - Country codes that aren't language codes fail:
dk(Danish isda),jp(Japanese isja),cz(Czech iscs) - Withdrawn codes fail, such as
iwfor Hebrew (nowhe),infor Indonesian (nowid) andjifor Yiddish (nowyi), which some older software still writes - Three-letter codes from ISO 639-2 and ISO 639-3, such as
engorfilfor Filipino, fail - Codes with a region, such as
en-US, fail: check those with the Locale Code Validator
Good to know
- A code that passes is in the copy of the ISO 639-1 list that comes with validator.js. The page can't tell which language a text is written in.
- Some country codes are codes of other languages, so they pass:
seis Northern Sami (Swedish issv),kris Kanuri (Korean isko), andukis Ukrainian, not the United Kingdom. - For the script part of a locale code, such as
Latn, use the ISO 15924 Script Code Validator.
Features
- Checks two-letter ISO 639-1 codes against the list
- Rejects withdrawn codes and three-letter codes
- Results as you type, with no button to press
- Runs in your browser, so nothing you type is sent anywhere