staticdata.dev
Menu
Datasets About Contact

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.

v1.0.0 MIT 183 records Updated 2026-10-05 stable Source:  ISO 639-1, ISO 639-2

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
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

    Open

    min: 23.0 KB · /v1/language-codes.min.json

  • CSV 7.9 KB

    /v1/language-codes.csv

    Open
  • TypeScript 31.8 KB

    /v1/language-codes.ts

    export const languageCodes

    type LanguageCode = (typeof languageCodes)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
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.

Data preview
alpha2alpha3Talpha3BnamenativeNamescript
aaaaraarAfarAfarafLatin
ababkabkAbkhazianАҧсуаCyrillic
aeaveaveAvestanavestaAvestan
afafrafrAfrikaansAfrikaansLatin
akakaakaAkanAkanLatin
amamhamhAmharicአማርኛEthiopic
anargargAragonesearagonésLatin
araraaraArabicالعربيةArabic
asasmasmAssameseঅসমীয়াBengali
avavaavaAvaricавар мацӀCyrillic

Showing 10 of 183. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/language-codes.json | jq '.[0]'
JavaScript
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]);
Python
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])
Go
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])
}
Rust
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.

Related datasets

More Locale datasets