Skip to content
Maintained country code collection 🇫🇷 🇩🇪 🇮🇹
PHP
Latest commit 7135cc2 Jan 24, 2016 @johannesl Shorter names available in JSON format and all JSON files are now sor…
…ted to make tracing changes easier.
Failed to load latest commit information.
README
countryaliases.json Shorter names available in JSON format and all JSON files are now sor… Jan 24, 2016
countryaliases.php Removed short_open_tag Dependance Oct 13, 2014
countrycodes-shorter.json
countrycodes.json
countrynames-shorter.json
countrynames-shorter.php Vatican City State now uses it's more common name in countrynames-sho… Jan 24, 2016
countrynames.json Shorter names available in JSON format and all JSON files are now sor… Jan 24, 2016
countrynames.php
example.php Removed short_open_tag Dependance Oct 13, 2014

README

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Helpful tools when you want software to support more than a single country
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Collections and code by Johannes Lundberg
Send fixes to first.last@gmail.com

Use freely. Public domain.


== countrynames.php / countrynames.json / countrycodes.json ==
List of all countries and their ISO 3166:2 code.
Names are in UTF-8.

== countrynames-shorter.json / countrycodes-shorter.json / .php ==
Shorter names used commonly in english language instead of the offical names.
Mapping back and forth to their corresponding ISO 3166:2 code.

== countryaliases.php / countryaliases.json ==
You have a UTF-8 string with a supposed country name.
Use this to validate that name, and get the country's ISO 3166:2 code.

** These collections are maintained and up to date. **
Something went wrong with that request. Please try again.