Language Codes
ISO 639-1 (alpha-2), 639-2 (alpha-3 terminological and bibliographic), the language's English name and native name, the dominant writing script, and writing direction. Use for language pickers, lang attributes on HTML, RTL detection, and content negotiation.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/language-codes.json
Or use as a typed import:
import { languageCodes } from "https://staticdata.dev/v1/language-codes.ts"
Formats
- JSON 31.6 KB
/v1/language-codes.json
min: 23.0 KB · /v1/language-codes.min.json
- CSV 7.9 KB
/v1/language-codes.csv
- TypeScript 31.8 KB
/v1/language-codes.ts
export const languageCodes
type LanguageCode = (typeof languageCodes)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| alpha2 | string | ISO 639-1 alpha-2 code | en |
| alpha3T | string | ISO 639-2/T (terminological) alpha-3 code | eng |
| alpha3B | string | ISO 639-2/B (bibliographic) alpha-3 code | eng |
| name | string | English name | English |
| nativeName | string | Native name | English |
| script | string | Primary writing script | Latin |
| direction | "ltr" | "rtl" | Writing direction | ltr |
Preview
First 10 records.
| alpha2 | alpha3T | alpha3B | name | nativeName | script |
|---|---|---|---|---|---|
| aa | aar | aar | Afar | Afaraf | Latin |
| ab | abk | abk | Abkhazian | Аҧсуа | Cyrillic |
| ae | ave | ave | Avestan | avesta | Avestan |
| af | afr | afr | Afrikaans | Afrikaans | Latin |
| ak | aka | aka | Akan | Akan | Latin |
| am | amh | amh | Amharic | አማርኛ | Ethiopic |
| an | arg | arg | Aragonese | aragonés | Latin |
| ar | ara | ara | Arabic | العربية | Arabic |
| as | asm | asm | Assamese | অসমীয়া | Bengali |
| av | ava | ava | Avaric | авар мацӀ | Cyrillic |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/language-codes.json | jq '.[0]' import type { LanguageCode } from "https://staticdata.dev/v1/language-codes.ts";
const res = await fetch("https://staticdata.dev/v1/language-codes.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const languageCodes: LanguageCode[] = await res.json();
console.log(languageCodes[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/language-codes.min.json") as r:
languageCodes = json.load(r)
print(languageCodes[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/language-codes.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/language-codes.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
The dataset covers all 183 languages with an ISO 639-1 alpha-2 assignment (as of October 2026). ISO 639-3 codes (the most exhaustive list) are not included here.
For most languages the terminological (alpha3T) and bibliographic (alpha3B) codes are identical. They differ for a small number of languages with separate library-cataloguing traditions (German has deu/ger, French has fra/fre, Greek has ell/gre, etc.). Use alpha3T unless you specifically need the bibliographic variant.
Direction is rtl for Arabic, Hebrew, Persian, Urdu, Pashto, Sindhi, Kashmiri, Yiddish, Divehi, Uyghur, and Avestan. All others are ltr in their dominant script (Hausa, for example, is today written mainly in Latin script; its Arabic-script Ajami form is right-to-left).
Native names use the language’s preferred script.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
language-codes changelog for this dataset's history.