Decode country codes

Decode international phone numbers to find the country that they correspond to.

Decode country codes


Phone numbers can be valuable data points containing geographic and device information. With international numbers, the country code will tell you which country that the phone number belongs to. Yet decoding those codes can be difficult, especially when doing it across a large data set or multiple data sets.

In Excel, you could copy and paste a list of country codes, and then use a combination of SUBSTRING and VLOOKUP to try and match the codes, but it will be time consuming.


Using some simple data cleaning techniques and a provided list of country codes, we can easily generate a list of our phone numbers with the country code decoded. This same method can be used for area codes or device specific numbers.

Begin by adding temporary ID's using the Insert row numbers step. From there, since the sample data has a unique delimiter between the country code and the rest of the number, we can use the Split column step to split the country codes out. Then filter the columns down to the ID and the Country Code, allowing a simple Join between it and the provided country code data. Now that the decoded versions have been added, join this data back with the original set using a Merge tables horizontally step and referencing the temporary ID.