available in multiple languages, in CSV, JSON, PHP, SQL and XML formats, with associated alpha-2, alpha-3, and numeric codes as defined by the ISO 3166 standard, and with national flags included; also available are the ISO 3166-2 codes used for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1
Constantly updated lists of world countries, territories and areas of geographical interest, with associated alpha-2, alpha-3 and numeric codes as defined by the ISO 3166-1 standard, published and maintained by the International Organization for Standardization, available in CSV, JSON, PHP, SQL and XML formats, in multiple languages and with national flags included. Also available are the ISO 3166-2 codes used for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1.
In the language folders (inside
data/countries) you will find files named in two different ways.
Here's what you will find in each of them:
|world.*||Files named like this contain all the 249 countries, territories, and areas of geographical interest that have an officially assigned ISO 3166-1 code.|
|countries.*||Files named like this contain 195 entries made up from the 193 sovereign states (commonly refered to as countries) that are members of the United Nations (UN) plus the 2 observer states of Palestine and the Vatican City State.|
Note that there are 206 sovereign states in the world, the 11 states that are missing from the countries list being the ones having their sovereignty disputed. See the list of sovereign states with information on their status and recognition of their sovereignty.
The files contain:
1 for other languages the country names are in that particular language 2 ISO 3166-1 alpha codes are uppercase but this library provides them in lowercase
The lists are currently available in 31 languages: Arabic, Armenian, Basque, Bulgarian, Chinese (simplified), Chinese (traditional), Czech, Danish, Dutch, English, Esperanto, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Japanese, Korean, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Swedish, Thai, Ukrainian
All data is taken from Wikipedia.
The project also tries to be a comprehensive and up-to-date source for ISO 3166-2 which defines codes for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1.
The purpose of ISO 3166-2 is to establish an international standard of short and unique alphanumeric codes to represent the relevant administrative divisions and dependent territories of all countries in a more convenient and less ambiguous form than their full names. Each complete ISO 3166-2 code consists of two parts, separated by a hyphen:
US-TX for Texas, USA
The first part is the ISO 3166-1 alpha-2 code of the country;
The second part is a string of up to three alphanumeric characters, which is usually obtained from national sources and stems from coding systems already in use in the country concerned, but may also be developed by the ISO itself.
Each complete ISO 3166-2 code can then be used to uniquely identify a country subdivision in a global context.
The list is available in
XML formats in the
data/subdivisions folder and the CSV one looks like this:
The starting point of this list was the ISO 3166-2 Subdivision Code list provided by IP2Location but this one will be maintained by the community.
The library provides national flags of each country as a 16x16, 24x24, 32x32, 48x48, 64x64 and 128x128 PNG images, courtesy of IconDrawer. The image files are named using the ISO 3166-1-alpha-2 code of the country they represent, for easily pairing flags with countries.
To download the entire package containing all the world countries in all the 31 languages, in all the available formats (CSV, JSON, PHP, SQL and XML), with flags included, and with the ISO 3166-2 list of administrative divisions and dependent territories of all countries, use the big Download button at the top.
Alternatively, use the form below to download world countries names in the language(s) and format(s) of your choice, with or without the national flags.
copyright © 2016 - 2022 stefan gabos