Continents & countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital, currency, native name, phone. JSON, CSV and SQL.

Installs: 77 325

Dependents: 3

Suggesters: 0

Security: 0

Stars: 949

Watchers: 20

Forks: 426

Open Issues: 17


2.6.1 2021-01-12 10:53 UTC


Monthly Downloads NPM Packagist CI: JS CI: PHP Twitter

Continents & countries: ISO 3166-1 alpha-2 code (with alpha-2 to alpha-3 set), name, ISO 639-1 languages, capital and ISO 4217 currency codes, native name, calling codes. Lists are available in JSON, CSV and SQL formats. Also, contains separate JSON files with additional country Emoji flags data.

Version 2.0: Breaking changes

This version changes a lot in the data structures, and placement of the files. So, if your projects depend on the old structure — specify previous versions, <2.0.0.


Package is available via:

  • NPM npm install countries-list
  • Composer / Packagist composer require annexare/countries-list
  • Bower bower install countries


Module exports continents, countries, languages and functions:

  • getEmojiFlag(countryCode), where countryCode is alpha-2 String
  • getUnicode(emoji), where emoji is alpha-2 emoji flag String

Built files are in the ./dist directory. The ./data directory contains source data.

The consistent data is available from ./dist/data.* files (JSON, SQL).

Note: ES6 builds:

  • CJS ./dist/index.js.
  • ESM ./dist/index.mjs.
  • IIFE ./dist/index.iife.js.

Note: Country item languages field is an Array in JSON files to easily count and match items with a Language item. But currency and phone calling codes may be a comma-separated String.

Data example

  "continents": {
    "AF": "Africa",
    "AN": "Antarctica",
    "AS": "Asia",
    "EU": "Europe",
    "NA": "North America",
    "OC": "Oceania",
    "SA": "South America"
  "countries": {
    "AE": {
      "name": "United Arab Emirates",
      "native": "دولة الإمارات العربية المتحدة",
      "phone": "971",
      "continent": "AS",
      "capital": "Abu Dhabi",
      "currency": "AED",
      "languages": [
      "emoji": "🇦🇪",
      "emojiU": "U+1F1E6 U+1F1EA"
    "UA": {
      "name": "Ukraine",
      "native": "Україна",
      "phone": "380",
      "continent": "EU",
      "capital": "Kyiv",
      "currency": "UAH",
      "languages": [
      "emoji": "🇺🇦",
      "emojiU": "U+1F1FA U+1F1E6"
  "languages": {
    "ar": {
      "name": "Arabic",
      "native": "العربية",
      "rtl": 1
    "uk": {
      "name": "Ukrainian",
      "native": "Українська"


Everything is generated from files in ./data/, including SQL file.

Everything in ./dist/ is generated, so please make data related changes ONLY to files from ./data/, commit them. Use npm run build command to build/test generated files.


Prepared by Annexare Studio from different public sources. Feel free to use it as you need in your apps or send updates into this public repository. It's under MIT license.