==== What is it: ================================================================================================================== ip2c.org exists to resolve IPs to country codes/names. | + fast and simple URL API + updated daily + has information on over 4,280,466,464 IPv4s » please read Inputs and Outputs sections for instructions Your IP is and it's listed as
United States in today's dataset.
Try it:
This service is FREE (LGPL) because we strongly support technology sharing. FREE does not imply low quality. Our uptime has been 99.95% since the beginning of 2009, courtesy of ultra-simple design. Amount of requests per user / per day is unlimited, just be reasonable. Currently we can sustain a maximum of about 30 million per day.
==== News: ======================================================================================================================== Nov 24 Webnet77.com domain became a malware site - be careful! @Stephen - thank you for the heads up. 2022 Apr 16 Seems like something happened to our IP data provider - Webnet77.com Their domains show nameserver problems. IP2C data won't be updated for the time being - sorry. Check back for more news later. 2021 2020 Nov 4, 10:10 p.m. UTC 13 billion requests served. Sep 5, 2:01:23 a.m. UTC 12 billion requests served. Jul 9, 8:55:19 p.m. UTC 11 billion requests served. May 6, 3:21:06 a.m. UTC 10 billion requests served. Mar 10, 12:07:35 p.m. UTC 9 billion requests served. Jan 9, 8:52:27 p.m. UTC 8 billion requests served. 2019 Oct 30, 6:57:20 p.m. UTC 7 billion requests served - total give:take ratio at 1802k:1. Aug 5, 3:45:14 a.m. UTC 6 billion requests served - total give:take ratio at 1580k:1. May 24 Added Privacy policy and Compliance with GDPR page. May 12 ~ 13 Possible momentary outages with error HTTP 500 Hosting provider's fault - "planned" maintenance for "only some" of the servers, but somehow all of our 5 servers were affected. Apr 15 HTTPS has been added. You can still use HTTP if you want (e.g. if your app can't make https requests). Apr 1, 3:15:10 a.m. UTC 5 billion requests served - total give:take ratio at 1362k:1. Mar 14 10 years of service - total give:take ratio at 1330k:1. Thank you for your trust! Tell all your friends :) Consider donating $1 for each year ip2c was useful to you ;) 2018 Nov 28, 5:42:54 p.m. UTC 4 billion requests served - total give:take ratio at 1128k:1. Jul 7, 11:28:45 a.m. UTC 3 billion requests served - total give:take ratio at 881k:1. May 1 ~ 16 Transparently transitioning to better servers, should yield +50% load capacity. Mar 14 9 years of service - total give:take ratio at 690k:1. Also PI day Jan 20, 3:16:22 a.m. UTC 2 billion requests served - total give:take ratio at 618k:1. 2017 Dec 16, 6:22 p.m. ~ 2:08 a.m. UTC Filesystem problem on 1 of our 3 servers, might have caused malformed responses to ~10% requests. Sep 12, 9:45 a.m. ~ 3:35 p.m. UTC outage Hosting provider's fault, possible momentary outages on 1 of our 3 servers. Poland... They say the cause is datacenter-wide DDoS from competition. Sep 6, 9:25 ~ 10:05 a.m. UTC outage Hosting provider's fault, datacenter-wide outage. Jun 13, 4:02:50 p.m. UTC Billionth request served - total give:take ratio at 332k:1. Jun 11 Added header: Access-Control-Allow-Origin: * Now it should work with Ajax/XHR. This feature was overlooked for too long... May 31 outage Today we had a total of about 50 minutes of partial outages around 2 and 4 p.m. Our hosting provider rolled out updates for 500k of their clients, without testing. May 15 Stat functions have been rewritten and are up-to-date again. Apr 10 Design has been modified to support pooled servers. Currently running on 3 apaches in round-robin. This is due to hosting environment not supporting nginx and php-fpm anymore. Some stats can be out-of-date until we rewrite them to fit the new design. Mar 24 8 years of service - total give:take ratio at 277k:1. 2016 Nov 21 Added live graph to Stats page. Bored engineers in da house. Oct 25 Added Users of the Month page. Enjoy. Fun fact: French users exhibit EMF (End of Month FeverTM). Oct 17 Added a try-it form to About page - for newcomers. Added users & countries to Stats page. Oct 4 Server software upgraded: ubuntu 10.04 → 14.04 | apache 2.2 → nginx 1.4.6 | mod_php → php-fpm | php 5.2 → 5.5.9 Tested at ~820 reqs per second, limited only by uplink bandwidth. Have fun overloading it. Jul 7 ~ Jul 13 outage Segfault in Apache occured on Jul 7, 5:35 a.m. UTC, daemon somehow failed to restart it. We haven't noticed this until Jul 13, 5:45 p.m. UTC, being preocuppied with other professional affairs. We apologize for this epic fail. Watchdog has been implemented. Apr 18 A record has been set! 16.7 million requests served in one day! Mar 14 ip2c.org is 7 years old \^~^/ with total give:take ratio at 192k:1. 2015 Nov 12 home.pl update: Over the last two weeks we inquired 9 times about proof of alleged server overload (2 phone calls, 7 emails). They failed to produce even a single fact, of course. Instead they suggested 5 times that we should buy a more expensive hosting plan. Oct 30, 1 p.m. ~ 12 a.m. UTC outage Flush your DNS tables and restart your apps - we had to change server IP! Our hosting provider home.pl blocked without warning our entire server in order to extort more money. They stated that ip2c.org generates too much load and destabilizes their infrastructure. Note that home.pl is the biggest and the most advanced hosting provider in the country, whereas one IP lookup takes 3 io (ram cached), lasts about 1.0ms, and prints between 13-46 bytes + http. Too much load my ass. They hadn't actually noticed the last 200,000,000 'destabilizing' requests for months until we contacted their support on Oct 28 and politely asked about their cpu load limits etc. At that moment, suddenly, a catastrophe of melting datacenters revealed itself, and they were forced to take swift action... against a free public service. Their proposed solution was 'buy a more expensive hosting plan'. Fuck you home.pl, you are officially relieved of this gruelling duty. Everything is back online 12 hours later, now featuring hardcore thunderous 2-core 1gb ubuntu box - owned by us, no 3rd party involved, no conflict of interest. Oct 4 13 months and 264 million requests later, our give:take ratio has gone from 37k:1 to 141k:1 (6.5 year total). Last month alone is 1.3m:1. 2014 Oct 17 Domain renamed to ip2c.org for convenience. GeoLoc.daiguo.com still works for backwards compatibility. Sep 9 Added new input notations based on mod_rewrite. This upgrade is minor but long due. Sep 7 We have seen around the Net people assume this service simply forwards requests to Software77 servers. In reality, since day 1, this service resolves requests locally, and calls Software77 once a day for updated data. In 5.5 years we have accessed Software77 servers about 2k times, while producing 74m+ answers on our own. We are actually relieving their servers of load. Jul 9 License changed to LGPLv3 making our service more usable. 2013 Oct 16 As IPv4 space comes close to its limit, we will deliver an IPv6 option soon. 2012 Jul 10 We are still here, no major hiccups in 2.5 years. Hope it serves your needs properly. 2011 2010 Jan 9 Core is redesigned and rebuilt from scratch. Databases are no longer in use, seems they were too bulky to operate. New solution features RAM-based indexed binary search. Update process has been reduced from over 60 minutes to under 10 seconds. This makes GeoLoc accurate within 2 hours after new data is published by Webnet77.com, instead of 17 hours as it was until yesterday. Jan 7 Starting 1 a.m. UTC something is really wrong. Out of 96 database update threads 34 crash during 31 hours' period. It means extreme overload generated by those other websites. Results in presumably over 30% incorrect answers by GeoLoc. 2009 Nov 22 ~ Dec 20 Server shows some strain from time to time. Not related to amount of requests, however. There are 80-90 other websites hosted virtually on the same machine as this service, they probably start getting more and more visitors - which results in shared overload. Sorry for the inconvenience. Sep 13 Added load distribution (4 parallel databases) If flooding takes place again, we will add automated blacklisting. This is public service after all. Sep 12 Server overwhelmed by some mad script from (France) 150,000 requests/day from a single IP is a bit too many. Anyone responsible for this - please revise your loops. Everyone - consider caching retrieved results for at least one day. 'Cookie' your clients wherever possible, IP data changes slowly enough to be updated just once a day. If you feel like killing your server with thousands of IPs per second, download a csv from <http://software77.net/geo-ip> Mar 14 GeoLoc.daiguo.com says Hello World! 2008
==== Accepted inputs: ============================================================================================================= You can use http or https. https://ip2c.org/XXX.XXX.XXX.XXX or https://ip2c.org/?ip=XXX.XXX.XXX.XXX | + standard IPv4 from to + e.g. we take your IP: | + URL looks like this: https://ip2c.org/ | or | https://ip2c.org/?ip= | + resulting string is: 1;US;USA;United States https://ip2c.org/XXXXXXXXXX or https://ip2c.org/?dec=XXXXXXXXXX | + decimal number from 0 to 4294967295 (MAX_INT) + faster than ?ip= option, less server-side processing + to convert IPv4 to decimal you only need to know this: | + (IPv4) A.B.C.D == A*256^3 + B*256^2 + C*256 + D (decimal) + e.g. == 5*256^3 + 6*256^2 + 7*256 + 8 == 5*16777216 + 6*65536 + 7*256 + 8 == 83886080 + 393216 + 1792 + 8 == 84281096 https://ip2c.org/s or https://ip2c.org/self or https://ip2c.org/?self | + processes caller's IP + faster than ?dec= option but limited to one purpose - give info about yourself Caution Some clients (e.g. ASP) may have issues while trying to open a file over HTTP. In that case a slash / preceding ?ip= is obligatory.
==== Possible outputs: ============================================================================================================ You can use http or https. 0;;;WRONG INPUT | + your request has not been processed due to invalid syntax | + e.g. bad IPv4 like 300.400.abc.256 + e.g. bad decimal like 2a3b4c or bigger than MAX_INT 1;CD;COD;COUNTRY | + contains two-letter (ISO 3166) and three-letter country codes, and a full country name + country name may be multi-word and contain spaces + e.g. we take your IP: | + URL looks like this: https://ip2c.org/ | or | https://ip2c.org/?ip= | + resulting string is: 1;US;USA;United States 2;;;UNKNOWN | + given ip/dec not found in database or not yet physically assigned to any country The first digit indicates status so you don't have to always parse the whole string. Output is always semicolon delimited text/plain - you can pass it to any type of application.
==== PHP example: ================================================================================================================= $ip = ''; //or any other IP here $s = file_get_contents('http://ip2c.org/'.$ip); switch($s[0]) { case '0': echo 'Something wrong'; break; case '1': $reply = explode(';',$s); echo '<br>Two-letter: '.$reply[1]; echo '<br>Three-letter: '.$reply[2]; echo '<br>Full name: '.$reply[3]; break; case '2': echo 'Not found in database'; break; }
==== Java example: ================================================================================================================ String ip = ""; //or any other IP here HttpURLConnection urlcon = (HttpURLConnection)new URL("http://ip2c.org/"+ip).openConnection(); urlcon.setDefaultUseCaches(false); urlcon.setUseCaches(false); urlcon.connect(); InputStream is = urlcon.getInputStream(); int c = 0; String s = ""; while((c = is.read()) != -1) s+= (char)c; is.close(); switch(s.charAt(0)) { case '0': System.out.println("Something wrong"); break; case '1': String[] reply = s.split(";"); System.out.println("Two-letter: " + reply[1]); System.out.println("Three-letter: " + reply[2]); System.out.println("Full name: " + reply[3]); break; case '2': System.out.println("Not found in database"); break; }
==== License: ===================================================================================================================== This service is provided FREE under the terms of the GNU LGPLv3, 29 June 2007 https://www.gnu.org/copyleft/lesser.html This means the service is provided "as is". There is NO WARRANTY WHATSOEVER for the service. Use at your own risk. ==== Notes: ======================================================================================================================= Until April 2021 this service used IP to Country Database (csv) maintained by Webnet77.com These links are no longer valid, domains have been picked up by possible malware sites - be careful! http://webnet77.com/contact.html http://software77.net/geo-ip Kept here for historical reference only. Flag icons come from a free set created by GoSquared https://www.gosquared.com/resources/flag-icons You may contact the author of this service at <mail at ip2c dot org>
==== Privacy policy and Compliance with GDPR: ===================================================================================== GDPR information at Wikipedia ip2c.org collects these data per each API request: | + date and time of the request + IPv4 address of the client machine which initiated the request + IPv4 address which was given as a parameter in the request's query If you think about it, this is the same information as has been always collected in any standard HTTP server logs around the world, or less: time, remote IP, path/query of GET request. These data are collected for internal purposes: | + aggregate statistics, as shown in Stats and User of the Month + service quality assurance (load analysis, response accuracy analysis) + detection of abuse These data are not collected when visiting human-oriented content, such as the website you are reading now. These data are collected only for requests made with the correct input format, and if the output response starts with 1 or 2. By design, users are prevented from accidentally opening any URLs which may result in data collection. Using ip2c.org service (opening a connection to any of the URLs at *.ip2c.org or geoloc.daiguo.com domains which may cause data collection) constitutes user's consent to collection, storage and processing of the data listed above. If your website makes a call to ip2c.org over XHR/Ajax, your visitor's IP address will end up being collected by our internal logs - when XHR/Ajax is used, your visitor's device is the client machine which initiated the request. If your visitor doesn't want to connect to ip2c.org without consent or warning, this becomes your responsibility as a developer/administrator/owner of your website. ip2c.org does not set tracking cookies nor session cookies. The only cookie(s) set by about.ip2c.org are used for caching the visitior's IP-to-country resolution, which is visible only to the same visitor in sections: What is ip2c.org, Inputs, Outputs The same cookie(s) are used for eliminating duplicate hits in page statistics shown in the bottom right corner of: this page, Thank You List, User of the Month All other cookies are set by one of these: Google Analytics, PayPal, Facebook, Twitter. Having a name listed in the Thank You List requires an explicit written consent. All individuals whose data are present in the Thank You List have submitted their consent by direct email or by PayPal Payment Note prior to May 25th, 2018 For any inquiries regarding personal data access, modification, or removal, you may contact the administrator of this service at <mail at ip2c dot org>
==== Statistics: (2023 Mar 26, 10:00 UTC+2) ====================================================================================== 32,685,485,069 requests processed since 2008 Mar 14 1,089,791 last hour 302.7/s ~87.2% of server load capacity
click here to start LIVE graph
27,935,897 requests yesterday by 1,334,818 users from 229 countries 23,434,062 last 7 days average 24,283,778 last 30 days average Graphs: 2008 2009 2010 2011 2012 2013+zoomed 2014 2015 2016 2017 2018 2019 2020 30 days 12 years
==== (c)2008-2022 ip2c.org ================================================================ IP data: 2021 Apr 15, 16:01 UTC+2 ==== ==== → User of the Month ← ==== x.x.154.121
If you appreciate
this service -
send us a few coins!

The Thank You List
page stat: 72,755,761

    88        88  
  ,d88      ,d88  
888888    888888  
    88        88      8b       d8   ,adPPYba,  ,adPPYYba,  8b,dPPYba,  ,adPPYba,  
    88        88      `8b     d8'  a8P_____88  ""     `Y8  88P'   "Y8  I8[    ""  
    88        88       `8b   d8'   8PP"""""""  ,adPPPPP88  88           `"Y8ba,   
    88        88        `8b,d8'    "8b,   ,aa  88,    ,88  88          aa    ]8I  
    88        88          Y88'      `"Ybbd8"'  `"8bbdP"Y8  88          `"YbbdP"'  

Follow @ip2c_org