Country-state-city-drop-down:- Country State City drop down using JavaScript and jQuery I Hope you liked Hand-picked list of PHP MySql City State Country Dropdown, Don’t forget to Subscribe My Public Notebook for more useful Hand-picked PHP and MySql code examples, tutorials and articles. I have received many users requests for making the dynamic dependent Country, State and City select box using jQuery and ajax in PHP. After getting lot of requests, I am going to explain how to create auto select country, state and city dropdown using help of jQuery, Ajax and Php.

Active1 year, 5 months ago

Is there a free csv, xml or in some other format database of all (or least top 20-50 biggest) cities for each country in the world?

Country state city excel free download free

My open data project (I am a co-founder) has a free list of all the cities in the world, along with their area centroid (lat/lng), as a CSV file. It is compiled from the USGS/GNIS (US) and NGA/GNS (non-US) databases.

As an alternate source, the United Nations Statistical Division publishes an annual yearbook on world statistics. Table 8 has the population of cities > 100,000

We have a version of it converted to ur Linked CSV format/vocabulary:

METADATA (dyb2012-pop2k)

  1. (Empty)
  2. ISO 3166-1 alpha-2 country code (e.g., US => United States)
  3. National Geospatial Intelligence Agency (NGA) Geographic Name Server (GNS) Feature Code (e.g., P = Populated Place Type Feature)
  4. NGA/GNS Feature Designation Code (e.g. PPL = Populated Place (incorporated))
  5. Extended Feature Description (e.g., city, capital)
  6. Total Area in Square Kilometers
  7. ISO 639-1 language code for language that name field is in (e.g., lc = local language native to the country)
  8. Language Script for name fields (e.g., latin, arabic, chinese)
  9. Short Name (Gazetteer) for City
  10. Year of Population Statistics
  11. Total Population (e.g., within city proper)
  12. Urban Population (e.g., within agglomerated area of city)
  13. Total Male Population
  14. Total Female Population
Andrew - OpenGeoCodeAndrew - OpenGeoCode

Consider geonames, which probably has the largest collection of place names anywhere (excluding street names, which is the purview of

From the directory above, you can download a list of 'large' cities (or every single placename geonames knows about), and 'readme.txt' in that directory explains further.


UN/LOCODE includes over 103,034 locations in 249 countries and installations in international waters. It is used by most major shipping companies, by freight forwarders and in the manufacturing industry around the world. It is also applied by national governments and in trade related activities, such as statistics where it is used by the European Union, by the UPU for certain postal services, etc.

Ricardo Padua SoaresRicardo Padua Soares

You can query the GlobalWeather API at, specifically the GetCitiesByCountry call. You would have to input a list of country names, but these are easily obtainable.

Country State City Excel Free DownloadCountry state city excel free download free

The highest quality dataset that I've seen is Natural Earth. About 7,000 cities total so you would need to filter it down if you don't want that many


Not the answer you're looking for? Browse other questions tagged city or ask your own question.

The files below cover the topics of the County-Level Data Sets. Data are available in Excel and comma-delimited text formats; see Documentation for sources.

Data SetLast UpdatedNext Update
Unemployment and median household income for the U.S., States, and counties, 2000-206/2/2021
Educational attainment for the U.S., States, and counties, 1970-20192/24/20212/25/2022
Poverty estimates for the U.S., States, and counties, 20191/5/20211/28/2022
Population estimates for the U.S., States, and counties, 2010-2010/8/2021

Country State City Excel Free Download Windows 7