# iso639-codes

> ISO639 Codes for JavaScript

Latest version **2.0.0** (published 2026-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install iso639-codes
pnpm add iso639-codes
yarn add iso639-codes
bun add iso639-codes
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-09-06 |
| First published | 2019-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 142.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Tiago Danin |
| Maintainers | tiagodanin |
| Keywords | code-locality, codes, i18n, iso, iso639, iso639-1, iso639-2, json, languages, locale, locales |

## Links

- npm: https://www.npmjs.com/package/iso639-codes
- Repository: https://github.com/TiagoDanin/ISO639-Codes
- Homepage: https://TiagoDanin.github.io/ISO639-Codes
- Issues: https://github.com/TiagoDanin/ISO639-Codes/issues
- npm.io page: https://npm.io/package/iso639-codes

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-09-06
- 1.0.1 — 2019-04-28
- 1.0.0 — 2019-04-28

## README

# ISO639 Codes

[![Node](https://img.shields.io/node/v/iso639-codes.svg?style=flat-square)](https://npmjs.org/package/iso639-codes) [![Version](https://img.shields.io/npm/v/iso639-codes.svg?style=flat-square)](https://npmjs.org/package/iso639-codes) [![Downloads](https://img.shields.io/npm/dt/iso639-codes.svg?style=flat-square)](https://npmjs.org/package/iso639-codes)

ISO639 Codes for JavaScript

## Installation

Module available through the [npm registry](https://www.npmjs.com/). It can be installed using the  [`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally) or [`yarn`](https://yarnpkg.com/en/) command line tools.

```sh
# NPM
npm install iso639-codes --save
# Or Using Yarn
yarn add iso639-codes
```

## Example

```js
import iso from 'iso639-codes'

iso['Portuguese'].name //'Portuguese'
iso['Portuguese'].names //['Portuguese']
iso['Portuguese']['iso639-2'] // 'por'
iso['Portuguese']['iso639-1'] // 'pt'

iso['Balinese']['iso639-2'] // 'ban'
iso['Balinese']['iso639-1'] // null

iso['Chichewa'].name // 'Chichewa'
iso['Chichewa'].names // ['Chichewa', 'Chewa', 'Nyanja']
```

> **CommonJS is still supported.** `const iso = require('iso639-codes')` keeps
> working and returns the same data.

TypeScript types ship with the package, including the union of every available language key:

```ts
import iso from 'iso639-codes'
import type { Iso639Code, Iso639Key } from 'iso639-codes'

const key: Iso639Key = 'Portuguese' // 'Klingonese' would not compile
const code: Iso639Code = iso[key]
```

## Documentation

### `iso639`
List of Languages

### `iso639[language]`
Get ISO information

- name (String)
- names (Array)
- iso639-2 (String)
- iso639-1 (String || null)

### Source
**NOTE:** Source is [www.loc.gov/standards/iso639-2/php/English_list.php](https://www.loc.gov/standards/iso639-2/php/English_list.php)

`index.json` is produced by `parser.js`, which is pasted in the browser console of the page above. `index.mjs` and `index.d.ts` are generated from `index.json`:

```sh
npm run build
# Or one at a time
npm run build:esm
npm run build:types
```

## Tests

To run the test suite, first install the dependencies, then run `test`:

```sh
# NPM
npm test
# Or Using Yarn
yarn test
```

## Dependencies

None

## Contributors

Pull requests and stars are always welcome. For bugs and feature requests, please [create an issue](https://github.com/TiagoDanin/ISO639-Codes/issues). [List of all contributors](https://github.com/TiagoDanin/ISO639-Codes/graphs/contributors).

## License

[MIT](LICENSE) © [Tiago Danin](https://TiagoDanin.github.io)

---
_Source: https://npm.io/package/iso639-codes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
