IP Country Database
Overview
Ever wonder what country a specific IP address comes from? Our IP to Country Database which is a part of our standard tier, helps you figure that out for any IPv4 or IPv6 address. We've packed it with all the details you'd want, not just the country name, but ISO codes, the continent, capital, dialing codes, currencies, languages, and TLDs. It even supports multiple languages, so you can get localized results right away, no extra steps needed.
We're pretty committed to having the most up-to-date information, which is why our databases are updated daily so that you're always working with the latest changes. We also make sure that the files are super light and easy to use. You can literally just drop them into your systems without a fuss.
You'll find everything you need to know in our documentation. We walk you through what's in the archives, the file structure, how to verify your downloads before you import them, just to be safe, and we’ve also included a few examples.
Available Database Formats
CSV Database Documentation
1. Overview
The CSV version is delivered as a ZIP archive that includes Gzip-compressed files with IP ranges, location details, and multilingual place names. It’s well-suited for bulk imports and easy integration into relational databases.
2. Archive Content
After downloading and extracting the IP to Country CSV database archive, you'll find the following files (with their types noted):
Standardized country and continent metadata with codes, currency, calling codes, TLDs, and languages.
- File Size: 9.67 KB
- Entries: 254
- Fields: 15
Multilingual place names for cities, districts, states, countries, and continents.
- File Size: 32.36 KB
- Entries: 690
- Fields: 13
IP ranges mapping to country IDs for linking each address block with standardized country details and metadata.
- File Size: 182.44 MB
- Entries: 30.6M
- Fields: 3
Documentation for dataset contents, schema, usage, and support.
- File Size: 8.00 KB
SHA-256 checksums for verifying file integrity.
- File Size: 329 Bytes
Schema
This section describes the schema of each file included in the IP to Country Database archive. For every file, you'll find its purpose, field definitions, and examples to help with integration.
1. db-ip-country.csv.gz
This file contains standardized country and continent details and metadata. It includes various codes (ISO-2/ISO-3/IOC), place IDs for names and capitals, currency details, international calling codes, top-level domains (TLDs), and language tags.
| Field | Type | Description | Can be empty? | Example |
|---|---|---|---|---|
| start_ip | string | The starting IP address of the range in IPv4 or IPv6 format. | No | 192.168.0.1 |
| end_ip | string | The ending IP address of the range in IPv4 or IPv6 format. | No | 192.168.0.255 |
| country_id | number | The unique identifier for the country associated with the IP range. | No | 192 |
I. Example Records
start_ip,end_ip,country_id
4.59.201.147,4.59.201.147,172
62.75.130.0,62.75.130.21,56
167.114.90.140,167.114.90.143,29
74.103.20.177,74.103.20.177,172
192.64.115.86,192.64.115.86,172
184.107.64.40,184.107.64.47,29
74.206.228.228,74.206.228.238,172
59.94.39.65,59.94.39.65,76
91.121.34.167,91.121.34.167,56
110.14.63.77,110.14.63.77,1932. db-place.csv.gz
This file contains multilingual names for countries, continents, states, districts, and cities worldwide. It serves as the reference dictionary for the IP Location Database, allowing you to resolve place IDs into multilingual responses across different regions and languages.
| Field | Type | Description | Can be empty? | Example |
|---|---|---|---|---|
| id | number | The unique identifier for the place. | No | 5375480 |
| place_english | string | The name of the place in English. | No | Mountain View |
| place_german | string | The name of the place in German. | Yes | Mountain View |
| place_russian | string | The name of the place in Russian. | Yes | Маунтин-Вью |
| place_korean | string | The name of the place in Korean. | Yes | 마운틴 뷰 |
| place_portuguese | string | The name of the place in Portuguese. | Yes | Mountain View |
| place_japanese | string | The name of the place in Japanese. | Yes | マウンテンビュー |
| place_persian | string | The name of the place in Farsi. | Yes | ماونتین ویو |
| place_french | string | The name of the place in French. | Yes | Mountain View |
| place_chinese | string | The name of the place in Chinese. | Yes | 山景城 |
| place_spanish | string | The name of the place in Spanish. | Yes | Mountain View |
| place_czech | string | The name of the place in Czech. | Yes | Mountain View |
| place_italian | string | The name of the place in Italian. | Yes | Mountain View |
I. Example Records
id,place_english,place_german,place_russian,place_korean,place_portuguese,place_japanese,place_persian,place_french,place_chinese,place_spanish,place_czech,place_italian
598,Quebec,Quebec,Квебек,Quebeque,Quebeque,ケベック州,,Québec,魁北克省,Quebec,Quebec,Quebec
316,Ile-de-France,Ile-de-France,Иль-де-Франс,,,イル = ド = フランス,,Ile-de-France,法兰西岛,Isla de Francia,Ile-de-France,Ile-de-France
6,North America,Nordamerika,Северная Америка,América do Norte,América Do Norte,北アメリカ, امریکای شمالی,Amérique du Nord,北美洲,Norteamérica,Severní Amerika,America del Nord
5,Asia,Asien,Азия,Ásia,Ásia,アジア, آسیا,Asie,亚洲,Asia,Asie,Asia
7,Europe,Europa,Европа,Europa,Europa,ヨーロッパ, اروپا,Europe,欧洲,Europa,Evropa,Europa
3723,New Delhi,Neu-Delhi,Нью-Дели,Nova Deli,,ニューデリー,,New Delhi,新德里,Nueva Delhi,New Delhi,Nuova Delhi
4509,Hudson,Hudson,Гудзон,,Condado de Hudson,ハドソン,شهرستان هادسون، نیوجرسی,Hudson,哈德森,Hudsona,Hudsona,Hudson
15,India,Indien,Индия,Índia,Índia,インド,هند,Inde,印度,India,Indie,India
240018,United States of America,,,,,,,,,,,
240019,"Washington, D.C.",,,,,,,,,,,
24,South Korea,"Korea, Republik (Südkorea)",Республика Корея,대한민국,Coreia do Sul,大韓民国,کرهٔ جنوبی,"Corée, République de",韩国,Jižní Korea,Jižní Korea,Corea del Sud
209767,Beauharnois-Salaberry,Beauharnois-Salaberry,Бохарнуа-Салаберри,,,ボアルノワ = サラベリ,,Beauharnois-Salaberry,博哈诺瓦-萨拉贝里,Beauharnois-Salaberry,Beauharnois-Salaberry,Beauharnois-Salaberry
4330,Dallas,Dallas,Даллас,,Condado de Dallas,ダラス郡,شهرستان دالاس، تگزاس,Comté de Dallas,達拉斯縣,Z Dallasu,Z Dallasu,Dallas
283,Seoul,Seoul,Сеул,서울특별시,,ソウル特別市,,Séoul,首尔特别市,Soul,Soul,Seul
28,United States,USA,США,Estados Unidos,Estados Unidos,アメリカ合衆国,ایالات متحدهٔ امریکا,États-Unis,美国,Estados Unidos,Spojené státy americké,Stati Uniti d'America
3948,Bas-Rhin,Bas-Rhin,Бас-Рин,Baixo Reno,Baixo Reno,バラン県,,Bas-Rhin,下莱茵省,Bajo Rin,Bas-Rhin,Basso Reno
31,France,Frankreich,Франция,França,França,フランス共和国,فرانسه,France,法国,Francia,Francie,Francia
6312,La Salle,La Salle,Ла-Салл,,Paróquia de La Salle,ラサール郡,لا ساله پریش,Paroisse de La Salle,拉萨尔堂区,La Salle,La Salle,La Salle
240035,Republic of Korea,,,,,,,,,,,
83,Georgia,Georgien,Грузия,Geórgia,Geórgia,ジョージア州,گرجستان,Géorgie,乔治亚,Georgia,Gruzie,Georgia
3630,Paris,Paris,Париж,,,パリだ,,Paris,巴黎,París,Paříž,Parigi
239920,Republic of France,,,,,,,,,,,
24096,Strasbourg,Straßburg,Страсбург,Estrasburgo,Estrasburgo,ストラスブール,استراسبورگ,Strasbourg,斯特拉斯堡,Estrasburgo,Štrasburk,Strasburgo
284,Gyeonggi-do,Gyeonggi-do,Кёнгидо,경기도,,京畿道,,Gyeonggi-do,京畿道,Gyeonggi-do,Gyeonggi-do,Gyeonggi-do
4550,Anne Arundel County,Anne Arundel,Анн-Арандел,,Condado de Anne Arundel,アナランデル郡,شهرستان آنا آروندل، مریلند,Comté d'Anne Arundel,安妮阿倫德爾縣,Анн-Арандел,Anne Arundel,Contea di Anne Arundel
373,Texas,Texas,Техас,텍사스 주,,テキサス州,تگزاس,Texas,德克萨斯州,Texas,Texas,Texas
3630,Paris,Paris,Париж,,,パリだ,,Paris,巴黎,París,Paříž,Parigi
5908,DeKalb County,DeKalb,Де-Калб,,Condado de DeKalb,ディカーブ郡,شهرستان دیکلب، جورجیا,Comté de DeKalb,迪卡尔布县,Де-Калб,Okres DeKalb,Contea di DeKalb
65,Canada,Kanada,Канада,Canadá,Canadá,カナダ,کانادا,Canada,加拿大,Canadá,Kanada,Canada
239935,Republic of India,,,,,,,,,,,
351,Grand Est,Grand Est,Гранд Эст,그랑테스트,,グランドエスト,,Grand Est,大东部州,Grand Est,Grand Est,Gran Est
291,Maharashtra,Maharashtra,Махараштра,Maarastra,Maarastra,マハーラーシュトラ州,مهاراشترا,Maharashtra,马哈拉施特拉邦,Maharastra,Maháráštra,Maharashtra
10795,Jalgaon,Jalgaon,Джалгаон,,,ジャルガオン,,Jalgaon,贾尔冈,Jalgaon,Jalgaon,Jalgaon
52037,Beauharnois,Beauharnois,Бохарнуа,,,ボーアルノワ,بوآرنوآ، کبک,Beauharnois,博哈诺瓦人,Beauharnois,Beauharnois,Beauharnois
40300,Friendship,Freundschaft,Френдшип,,,友情,,Amitié,友谊,Přátelství,Přátelství,Amicizia
135351,Paju,Paju,Паджу,,,パジュー,,Paju,帕州,Paju,Paju,Paju
4373,Montreal,Montreal,Монреаль,Montreal,,モントリオール,,Montréal,蒙特利尔,Montreal,Do Montrealu,Montréal
4588,Ottawa,Ottawa,Оттава,Otava,Condado de Ottawa,オタワ,شهرستان اتاوا، اکلاهما,Ottawa,渥太華縣,Ottawa,Ottawa,Ottawa
31781,Secaucus,Secaucus,Секакус,,,セコーカス,سیکوکس، نیوجرسی,Secaucus,赛考克斯,Secaucus,Secaucus,Secaucus
297,New Jersey,New Jersey,Нью-Джерси,Nova Jérsia,Nova Jérsia,ニュージャージー州,نیو جرسی,New Jersey,新泽西州,Nueva Jersey,New Jersey,New Jersey
4577,Decatur,Decatur,Декейтер,,Condado de Decatur,ディケーター郡,شهرستان دکاتور، تنسی,Comté de Decatur,第開特縣,Decatur,Decatur,Decatur
596,Maryland,Maryland,Мэриленд,메릴랜드 주,Maryland,メリーランド州,مریلند,Maryland,马里兰州,Maryland,Maryland,Maryland3. db-country.csv.gz
This file contains standardized country metadata for the IP Location Database. It includes continent codes and names, ISO-2/ISO-3/IOC country codes, country and official names (as place IDs), capital (place ID), currency (code, name, symbol), international calling codes, top-level domains (TLDs), and supported language tags.
| Field | Type | Description | Can be empty? | Example |
|---|---|---|---|---|
| id | number | The unique identifier for the country. | No | 192 |
| continent_code | string | The continent code associated with the country. | No | NA |
| continent_name_place_id | number | The unique identifier for the continent place. | No | 6255148 |
| country_code2 | string | The ISO 3166-1 alpha-2 code of the country. | No | US |
| country_code3 | string | The ISO 3166-1 alpha-3 code of the country. | No | USA |
| country_code_ioc | string | The IOC country code. | No | USA |
| country_name_place_id | number | The unique identifier for the country place. | No | 6252001 |
| country_name_official_place_id | number | The unique identifier for the official country place. | No | 6252001 |
| country_capital_place_id | number | The unique identifier for the capital place. | No | 5375480 |
| currency_code | string | The ISO 4217 currency code of the country. | No | USD |
| currency_name | string | The name of the currency used in the country. | No | United States Dollar |
| currency_symbol | string | The symbol of the currency used in the country. | No | $ |
| calling_code | string | The international calling code of the country. | No | +1 |
| tld | string | The top-level domain (TLD) of the country. | No | .us |
| languages | string | The official languages spoken in the country, represented as a comma-separated list of ISO 639-1 codes. | No | en,es |
I. Example Records
id,continent_code,continent_name_place_id,country_code2,country_code3,country_code_ioc,country_name_place_id,country_name_official_place_id,country_capital_place_id,currency_code,currency_name,currency_symbol,calling_code,tld,languages
29,NA,6,CA,CAN,CAN,65,65,4588,CAD,Canadian Dollar,C$,+1,.ca,"en-CA,fr-CA,iu"
193,AS,5,KR,KOR,KOR,24,240035,283,KRW,Won,₩,+82,.kr,"ko-KR,en"
56,EU,7,FR,FRA,FRA,31,239920,3630,EUR,Euro,€,+33,.fr,"fr-FR,frp,br,co,ca,eu,oc"
76,AS,5,IN,IND,IND,15,239935,3723,INR,Indian Rupee,₹,+91,.in,"en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc"
172,NA,6,US,USA,USA,28,240018,240019,USD,US Dollar,$,+1,.us,"en-US,es-US,haw,fr"4. File Relationship Diagram
The diagram below illustrates the relationships between the various files included in the CSV database package. It shows how the main CSV file connects to reference tables for countries, states, districts, and cities, ensuring consistent and accurate geolocation data across different regions and languages.
File Format & Encoding
All IP to Country CSV datasets are provided in UTF-8 encoding, comma-separated, and compressed with Gzip (.csv.gz). Each file includes a header row listing the field names for clarity and consistency.
Field values are unquoted by default, with quotes applied only in the following cases:
- Line breaks within text fields.
- Commas inside a value (e.g., addresses).
- Lists of values (e.g., languages).
- Spaces that may be auto-quoted by export tools.
MMDB Database Documentation
1. Overview
The MMDB version of our IP to Country is delivered as a ZIP archive that includes a single MMDB file with all geolocation data (including multilingual place fields), a README file, and a checksum file. It's optimized for fast lookups in applications and services, making it ideal for real-time queries and direct integration into your systems.
2. Archive Content
After downloading and extracting the IP to Country MMDB database archive, you'll find the following files (with their types noted):
Country-level geolocation database with IP ranges, multilingual country names, codes, capital, currency, languages, and related metadata.
- File Size: 19.82 MB
- Entries: 30.6M
Documentation for dataset contents, schema, usage, and support.
- File Size: 8.48 KB
SHA-256 checksums for verifying file integrity.
- File Size: 161 Bytes
Response Schema
This section describes the structure of the data returned from the IP to Country MMDB file. Each field is detailed with its type, meaning, and example values to help you interpret responses and integrate them into your applications.
1. db-ip-country.mmdb
This file contains standardized country and continent details. It includes multilingual country and capital names, ISO codes (ISO-2/ISO-3/IOC), currency details, international calling codes, top-level domains (TLDs), and language tags.
2. Field Reference
The following reference lists all fields available in the MMDB response. Each entry includes the field path, its description, data type, and example value to help you understand how to parse and integrate the data.
I. Example Records
{
"location": {
"country": {
"capital": {
"cs": "",
"de": "",
"en": "Washington, D.C.",
"es": "",
"fa": "",
"fr": "",
"it": "",
"ja": "",
"ko": "",
"pt": "",
"ru": "",
"zh": ""
},
"code2": "US",
"code3": "USA",
"code_ioc": "USA",
"continent": {
"code": "NA",
"name": {
"cs": "Severní Amerika",
"de": "Nordamerika",
"en": "North America",
"es": "Norteamérica",
"fa": " امریکای شمالی",
"fr": "Amérique du Nord",
"it": "America del Nord",
"ja": "北アメリカ",
"ko": "América do Norte",
"pt": "América Do Norte",
"ru": "Северная Америка",
"zh": "北美洲"
}
},
"currency": {
"code": "USD",
"name": {
"en": "US Dollar"
},
"symbol": "$"
},
"metadata": {
"calling_code": "+1",
"languages": "en-US,es-US,haw,fr",
"tld": ".us"
},
"name": {
"cs": "Spojené státy americké",
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fa": "ایالات متحدهٔ امریکا",
"fr": "États-Unis",
"it": "Stati Uniti d'America",
"ja": "アメリカ合衆国",
"ko": "Estados Unidos",
"pt": "Estados Unidos",
"ru": "США",
"zh": "美国"
},
"name_official": {
"cs": "",
"de": "",
"en": "United States of America",
"es": "",
"fa": "",
"fr": "",
"it": "",
"ja": "",
"ko": "",
"pt": "",
"ru": "",
"zh": ""
}
}
}
}Database Integrity & Authenticity Verification
There are two methods of verifying the integrity and authenticity of our Database:
1. Using the Signature File (Recommended)
IPGeolocation.io signs every database release to ensure its authenticity and integrity. This allows customers to verify that a downloaded IP to Country database file originates directly from IPGeolocation.io and has not been altered, corrupted, or tampered with during transfer or storage.
Each database update includes a corresponding signature file, generated using our private signing key. Customers can validate the database using the provided public verification key. To verify a database file, you need:
- Database file (the downloaded archive)
- Signature file (the matching signature for that archive)
- Public key (public-key.pem)
These files are available via official IPGeolocation.io download endpoints and are also shared in database update notifications.
2. Using the Checksum File (Legacy)
Each database archive includes a checksum.txt file containing the SHA-256 checksums for the files packaged in the archive. You can use this file to validate that the extracted contents are complete and unchanged.
Data Format & Constraints
- All fields defined in the schema are always present in the IP to Country MMDB response.
- Fields may contain empty strings (""), but never null, so null checks are not required.
- Place names such as countries, states, districts, and cities are available in multiple translations.
- All text values are encoded in UTF-8.
- Field names and response structure remain stable across updates for backward compatibility.
Database Updates & Delivery
When you subscribe to our IP to Country database, we'll send you static download links. These links never change, so you can use them both for your initial download and for all future updates. You will receive:
- Database Archive URL : downloads the latest release of your subscribed database (CSV, MMDB or requested formats).
- Signature File URL : downloads the matching signature file for the latest release (used for authenticity verification).
- Public Key URL : downloads the public verification key (used with the signature file).
- Status Endpoint URL : returns the database's most recent update timestamp.
Our databases are refreshed daily and weekly, ensuring you always have access to the most current data. Each time your subscribed dataset is updated, you'll also receive an email notification so you don't miss a release.
For automated workflows, you can check our status endpoint to see the last update timestamp. When the date changes, simply re-fetch the archive using your static download URL to pull the latest version into your system.