ip2c (ip to country) is a program written to determine the country associated to a specific IP address.

The program queries the five main whois servers responsible for each region of the world and try to automatically establish the most authoritative for the IP specified. Then it return the country's two-letter TLD (for example US), the extended country name (for example United States of America), its world region (for example North America) and a string containing a brief description of the organization managing the block of IP addresses containing the submitted IP (when available).

The program can also process a list of IPs stored in a comma delimited file and generate a new file with the country fields added to it.

ip2c is a multithreaded application, and queries all the servers in parallel to minimize the overall response time.

ip2c is distributed as a console (or command line) application (ip2c.exe) and a Windows GUI application (ip2c_gui.exe).

The features of the two versions are somewhat different and examined in more detail in the help file.

As usual I wrote the program for my specific needs, but you are welcome to use it if you find it useful.

ip2c running on Windows 7
ip2c on Windows 7

Some of the options
Some of the options

Written in PureBasic !
Written in PureBasic

Running in the taskbar
Written in PureBasic

Console version
Console version


This program is not a substitute for the offline databases offered by many geolocation commercial services if you need to process huge amounts of data.

Remember a whois server always has some kind of acceptable usage policy you should be familiar with.

If you use this program to manually check some IP addresses from time to time obviously there is no problem, that is what they are there for.

But if you use the batch mode you must NOT abuse the server. It's a service for all the Internet community so try to be polite.

Use the available program's options to limit the frequency of your queries and don't try to process a thousand of IP addresses in a single shot.

If you commit abuse you can be slowed down, banned for 24 hours, or permanently.

If you are in doubt look online for the policies of each whois server or ask to its admin directly.

Download ip2c (5,434 downloads).
Latest version is 1.0.27, released on May 26, 2014.
Development of ip2c is stopped, only bug-fixing if required from now on, no new features.

Some notes about the installation of a portable program like ip2c.

Supported OS: Windows XP, Windows Vista, Windows 7.
Does not require installation, can be used as a portable application, does not tamper with your registry, does not contain malware.
Written in PureBasic. Bugs, suggestions, kind words ? E-mail me.