The scenario is simple – I need a list of all countries. This is the task that need to be solved in majority of applications. So I sit down and tried to find a good solution for this problem. No matter which programming language or data format you use in your application or language you speak, this country list will suit your needs.
I actually wrote a piece of PHP code which generates a list of all country names with ISO 3166-1 codes.
Available in All Data Formats
New formats will be added in the future. Please feel free to suggest your favorite data formats.
Everybody Needs a Country Table
For developers, this is the most common case, they simply need a country table for their database. There are few SQL dumps for each DBMS:
All formats are also available in multiple languages, please find full language list here.
Where Does the Data Come From?
For now, I have implemented two data importers:
So, if country list changes in the future, it will be very easy to update our country list.
All contributions, Ideas and Suggestions are Welcome
Source code for this project is hosted on github. Feel free to fork it and play with it, once you change something, just run build script and it will rebuild all country files. I will be receiving any pull requests which improve this tool. You can add new formats, new data sources or suggest improvements in comments. If you find any bug, you can report it here.
Adding New Formats and Data Sources
Use it and Give Your Feedback
I hope someone will find this country list useful. Feel free to give your feedback and join this project.