Stefan Gabos web developer extraordinaire
List of world countries, as MySQL dump, with national flags
In my projects I often have to offer users the possibility to select their country, and I always find myself poking around for the most up-to-date list of world’s countries always wondering about the list’s accuracy. In the end I decided to compile my own list.
The result is the list of world’s countries as an SQL file containing the official short names in English as given in ISO 3166-1, the ISO 3166-1-alpha-2 code provided by the International Organization for Standardization and the ISO alpha-3 code provided by the United Nations Statistics Division . The package also contains the national flags of each country as a 16×11 GIF image. The image files are named using the ISO 3166-1-alpha-2 code of the country they represent, so you should have no problems in pairing flags and countries. The flag icons are taken from famfamfam.com
Keep in mind that while all the countries have ISO 3166-1-alpha-2 code, not all the countries have an ISO 3-alpha code. Also, keep in mind that, as far as I can tell, the flags are from 2007 and so may not be up-to-date
Download
World countries list, with national flags is distributed under the LGPL.
In plain English, this means that you have the right to view and to modify the source code of this software, but if you modify and distribute it, you are required to license your copy under a LGPL-compatible license, and to make the entire source code of your derivation available to anybody you distribute the software to.
You also have the right to use this software together with software thas has different licensing terms (including, but not limited to, commercial and closed-source software), and distribute the combined software, as long as state that your software contains portions licensed under the LGPL license, and provide information about where the LGPL licensed software can be downloaded.
If you distribute copies of this software you may not change the copyright or license of this software.
Changelog
Click on a version to expand/collapse information.
- version 1.1 (June 27, 2011)
-
- updated the list
- version 1.0 (January 30, 2006)
-
- initial release



I am a 32 year old web developer working from Bucharest, Romania. I am coding since I was 14 and I am extremely passionate about it. For the server side of things I use PHP/MySQL while on the front-end I write valid HTML 5, nice CSS and lots of JavaScript code using jQuery.
List of world countries, with national flags…
A list of world’s countries as an SQL file containing the official short names in English as given in ISO 3166-1, the ISO 3166-1-alpha-2 code provided by the International Organization for Standardization and the ISO alpha-3 code provided by the United…
ReplyHi, The how to use link is not working could you please show how to add the code, I have install the sql but struggling to add to my php files.
ReplyIs possible add a telephone area code with country?
Regards.
Replyi’ll look into it. thanks