Part of these Data Solutions
- Explore →
Global Country & Region Reference Data Solution
Authoritative country codes, regions and location reference data to power your location-based solutions.
- Explore →
Logistics Data Solution
Comprehensive reference for shipping codes, container standards and more.
- Explore →
Postal Codes Solution
Every worldwide postal-code dataset in one bundle — the ultimate global reference for precise postal codes.
API Access
Access dataset files directly from scripts, code, or AI agents.
Browse dataset files
API Access
Access dataset files directly from scripts, code, or AI agents.
Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.
Start with these files — they give you everything you need to understand and access the dataset.
- 1. Fetch datapackage.yml to inspect schema and resources
- 2. Download data resources listed in datapackage.yml
- 3. Read README.md for full context
Data Files
Explore with AIdata
| Field | Type | Description | Constraints |
|---|---|---|---|
| Name | string | English short name, as pycountry gives it, for example "Korea, Republic of". Names can contain commas (they are in quotes in the file) and brackets. | |
| Code | string | ISO 3166-1 alpha-2 two-letter country code. Unique. Note: the code for Namibia is the string "NA", which some readers (for example pandas by default) turn into a missing value. | { "pattern": "^[A-Z]{2}$" } |
Download
Download CSVAbout
- List of all countries with their English short names and corresponding ISO 3166-1 alpha-2 two-letter country codes.
- Last updated
- 16 October 2026
- Total rows
- ...
- Format
- CSV
- File size
- 3.83 kB
About this dataset
ISO 3166-1 Country List
English country names and their ISO 3166-1 alpha-2 code elements, in one CSV file. The list is rebuilt from the ISO 3166-1 data in the pycountry package.
Column definitions and types are in datapackage.yml.
Data
data.csv has one row per country or territory, sorted by Name:
| Column | Meaning |
|---|---|
Name | English short name, as pycountry gives it, for example Korea, Republic of. Names with a comma are in quotes, so they stay one column |
Code | ISO 3166-1 alpha-2 code: two upper-case letters, for example KR. Each code appears once |
Known limitations
-
"NA" is a code, not a missing value. The code for Namibia is the two letters
NA. Many tools read the textNAas "missing" by default. For example,pd.read_csv("data.csv")returns an empty value (NaN) for Namibia. To keep it, read the file withkeep_default_na=False:import pandas as pd df = pd.read_csv("data.csv", keep_default_na=False) -
Many names contain a comma, for example
"Korea, Republic of"and"Virgin Islands, U.S.". They are in quotes in the file, and any CSV reader keeps each name in one column. -
Names are formal short names, not always everyday usage. For example
Holy See (Vatican City State),Taiwan, Province of ChinaandCongo, The Democratic Republic of the. Match countries byCode, not byName. -
Names can change when the list is rebuilt, because the source updates its names. Codes change much less often, so use them as the key.
Data sources
- pycountry, a Python package that gives the ISO 3166-1 country codes and English short names. It includes a copy of the data of the Debian iso-codes project, used as it is (the iso-codes site refuses scripts, so that link could not be checked automatically). Licence: LGPL-2.1 for the package and its data; ISO's position on the names is unclear (see License).
Changes made to the source data: the script takes each country's English name and alpha-2 code from pycountry and sorts the rows by name. Nothing else is changed. The names are the ones pycountry gives, not ISO's own style with brackets such as Bahamas (the).
Not endorsed by, or affiliated with, ISO, the United Nations, pycountry or the iso-codes project.
Preparation
You need Python 3.12 or greater. To rebuild the data from the repository root:
pip install -r scripts/requirements.txt
python scripts/process.py
python scripts/validate.py
The script prints the pycountry version it used and writes data.csv. It stops with an error if pycountry returns fewer than 200 countries or a repeated code.
A GitHub workflow runs the script on the first day of every month (at 00:00 UTC) and when started by hand. It checks data.csv against datapackage.yml with Frictionless (scripts/validate.py) and commits data.csv if it changed.
License
The names and codes come from pycountry, which is licensed under the LGPL-2.1 and includes iso-codes data. The LGPL is a software licence. We found nothing that puts LGPL terms on this CSV.
The licence of the ISO 3166-1 list itself is unclear. What we checked:
- ISO states on its site: "ISO allows free-of-charge use of its country, currency and language codes from ISO 3166, ISO 4217 and ISO 639, respectively" (ISO 3166-1 page).
- The same ISO site says: "Any use, including reproduction requires our written permission" (ISO copyright page).
- ISO also says it does not define the names of countries: "this information comes from United Nations sources". We did not find the terms for those names.
- We found no ISO page that says whether the full list, with the names, may be republished under an open licence. ISO's own site and the Online Browsing Platform refuse scripted requests, so the pages above were read on ISO's committee site.
We could not establish whether the full list with the names may be reused. Using the codes is free of charge according to ISO. We think the risk is low, but the position is unclear. If you plan to republish or sell the list, ask ISO for written confirmation first.
The maintainers place only their own work (the script, the selection and arrangement of the list and the file) under the Public Domain Dedication and License (PDDL). This does not cover the ISO codes or the names themselves. See also ATTRIBUTION.txt.