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 142 records Updated 2026-04-25 stable Source:  ISO 639-1, ISO 639-2

Quick fetch

Stable, immutable 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 24.6 KB

    /v1/language-codes.json

    Open

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

  • CSV 6.2 KB

    /v1/language-codes.csv

    Open
  • TypeScript 24.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
afafrafrAfrikaansAfrikaansLatin
akakaakaAkanAkanLatin
amamhamhAmharicአማርኛEthiopic
araraaraArabicالعربيةArabic
asasmasmAssameseঅসমীয়াBengali
ayaymaymAymaraAymar aruLatin
azazeazeAzerbaijaniAzərbaycan diliLatin
babakbakBashkirБашҡорт телеCyrillic

Showing 10 of 142. 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 languages with an ISO 639-1 alpha-2 assignment. 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, Yiddish, Divehi, Hausa, and Uyghur. All others are ltr in their dominant script.

Native names use the language’s preferred script.

Versioning

URLs under /v1/ are immutable. The data they return will not change in a way that breaks consumers. Schema-incompatible updates ship under a new version path. See the language-codes changelog for this dataset's history.

Related datasets