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: 181.05 MB
- Entries: 30.4M
- Fields: 3
Documentation for dataset contents, schema, usage, and support.
- File Size: 8.17 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
113.195.125.245,113.195.125.245,35
73.225.88.85,73.225.88.85,172
179.98.18.0,179.98.18.205,23
50.54.253.90,50.54.253.90,172
15.235.59.0,15.235.59.81,29
184.145.66.48,184.145.66.48,29
210.79.44.142,210.79.44.142,83
101.57.31.22,101.57.31.22,80
207.181.224.168,207.181.224.168,172
174.89.67.114,174.89.67.114,292. 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
52477,Xinzhou,Xinzhou,Синьчжоу,신저우 시,,新州,شینجو,Xinzhou,忻州,Xinzhou,Xinzhou,Xinzhou
5,Asia,Asien,Азия,Ásia,Ásia,アジア, آسیا,Asie,亚洲,Asia,Asie,Asia
6,North America,Nordamerika,Северная Америка,América do Norte,América Do Norte,北アメリカ, امریکای شمالی,Amérique du Nord,北美洲,Norteamérica,Severní Amerika,America del Nord
7,Europe,Europa,Европа,Europa,Europa,ヨーロッパ, اروپا,Europe,欧洲,Europa,Evropa,Europa
8,South America,Südamerika,Южная Америка,América do Sul,América Do Sul,南アメリカ,امریکای جنوبی,Amérique du Sud,南美洲,Sudamérica,Jižní Amerika,America del Sud
598,Quebec,Quebec,Квебек,Quebeque,Quebeque,ケベック州,,Québec,魁北克省,Quebec,Quebec,Quebec
359,Lombardy,Lombardei,Ломбардия,롬바르디아 주,,ロンバルディア州,,Lombardie,伦巴第大区,Lombardía,Lombardie,Lombardia
13,Japan,Japan,Япония,Japão,Japão,日本,ژاپن,Japon,日本,Japón,Japonsko,Giappone
12,China,China,Китай,China,China,中国,چین,Chine,中国,China,Čína,Cina
28546,Kirkland,Kirkland,Киркланд,커클랜드,,カークランド,کرکلند، واشینگتن,Kirkland,柯克兰,Kirkland,Kirkland,Kirkland
271,Tokyo,Tokio,Токио,도쿄 도,,東京,,Tokyo,东京,Tokio,Tokio,Tokyo
240018,United States of America,,,,,,,,,,,
240019,"Washington, D.C.",,,,,,,,,,,
275,Beijing,Peking,Пекин,,,北京,,Municipalité de Pékin,北京,Peking,Peking,Pechino
239894,Federative Republic of Brazil,,,,,,,,,,,
39413,Amherstburg,Amherstburg,Амхерстбург,,,アマーストバーグ,,Amherstburg,阿默斯堡,Amherstburg,Amherstburg,Amherstburg
52485,Shangrao,Shangrao,Шанжао,상라오 시,,上饒市,شانگراو,Shangrao,上饶,Shangrao,Shangrao,Shangrao
4503,King County,King County,Кинг,킹 군,Condado de King,キング郡,شهرستان کینگ، واشینگتن,Comté de King,金县,Кинг,King County (Texas),Contea di King
28,United States,USA,США,Estados Unidos,Estados Unidos,アメリカ合衆国,ایالات متحدهٔ امریکا,États-Unis,美国,Estados Unidos,Spojené státy americké,Stati Uniti d'America
239901,People’s Republic of China,,,,,,,,,,,
597,Ontario,Ontario,Онтарио,Ontário,Ontário,オンタリオ州,انتاریو,Ontario,安大略,V Ontariu,V Ontariu,Ontario
240077,Regional Municipality of York,,,,,,,,,,,
35,Italy,Italien,Италия,Itália,Itália,イタリア共和国,ایتالیا,Italie,意大利,Italia,Itálie,Italia
400,Washington,Washington,Вашингтон,워싱턴 주,,ワシントン州,ایالت واشینگتن,Washington,华盛顿州,Washington,Washington,Washington
240078,Aichi Prefecture,,,,,,,,,,,
5163,Brasilia,Brasilia,Бразилиа,,,ブラジリア,,Brasilia,巴西利亚,Brasilia,Brasília,Brasilia
45,Brazil,Brasilien,Бразилия,Brasil,Brasil,ブラジル連邦共和国,برزیل,Brésil,巴西,Brasil,Brazílie,Brasile
24568,Merate,Merate,Порадоваться,Merate,Merate,メラーテ,,Merate,梅拉特,Merate,Merate,Merato
402,Illinois,Illinois,Иллинойс,Ilinóis,Ilinóis,イリノイ州,ایلینوی,Illinois,伊利诺伊州,Illinois,Illinois,Illinois
24109,Chicago,Chicago,Чикаго,Chicago,Chicago,シカゴ,شیکاگو,Chicago,芝加哥,Chicago,Do Chicaga,Chicago
4391,Essex County,Essex,Эссекс,,Condado de Essex,エセックス郡,شهرستان اسکس، ماساچوست,Comté d'Essex,艾塞克斯縣,Эссекс,Essex,Contea di Essex
52037,Beauharnois,Beauharnois,Бохарнуа,,,ボーアルノワ,بوآرنوآ، کبک,Beauharnois,博哈诺瓦人,Beauharnois,Beauharnois,Beauharnois
65,Canada,Kanada,Канада,Canadá,Canadá,カナダ,کانادا,Canada,加拿大,Canadá,Kanada,Canada
239939,Republic of Italy,,,,,,,,,,,
4357,Cook,Kochen,Кук,,Condado de Cook,クック郡,,Comté de Cook,庫克縣,Kuchař,Kuchař,Cucinare
12718,Kariya,Kariya,Ако,,,仮屋,,Kariya,卡里亚,Kariya,Kariya,Kariya
379,Sao Paulo,São Paulo,Сан-Паулу,São Paulo,São Paulo,サンパウロ市,,Sao Paulo,圣保罗,São Paulo,São Paulo,San Paolo
45631,Normandy Park,Normandie Park,Нормандия Парк,,,ノルマンディー公園,,Parc Normandie,诺曼底公园,Normandie Park,Normandie Park,Parco della Normandia
15448,Lecco,Lecco,Лекко,Lecco,,レッコ,,Lecco,莱科,Lecco,Lecco,Lecco
4588,Ottawa,Ottawa,Оттава,Otava,Condado de Ottawa,オタワ,شهرستان اتاوا، اکلاهما,Ottawa,渥太華縣,Ottawa,Ottawa,Ottawa
3952,Rome,Rom,Рим,,,ローマ,,Rome,罗马,Roma,Řím,Roma
209767,Beauharnois-Salaberry,Beauharnois-Salaberry,Бохарнуа-Салаберри,,,ボアルノワ = サラベリ,,Beauharnois-Salaberry,博哈诺瓦-萨拉贝里,Beauharnois-Salaberry,Beauharnois-Salaberry,Beauharnois-Salaberry
39372,Vaughan,Vaughan,Вон,,,ヴォーン,,Vaughan,旺市,Vaughan,Vaughan,Vaughan
1288,Jiangxi,Jiangxi,Цзянси,,,江西省,,Province de Jiangxi,江西,Jiangxi,Jiangxi,Jiangxi3. 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
83,AS,5,JP,JPN,JPN,13,13,271,JPY,Yen,¥,+81,.jp,ja
172,NA,6,US,USA,USA,28,240018,240019,USD,US Dollar,$,+1,.us,"en-US,es-US,haw,fr"
80,EU,7,IT,ITA,ITA,35,239939,3952,EUR,Euro,€,+39,.it,"it-IT,de-IT,fr-IT,sc,ca,co,sl"
23,SA,8,BR,BRA,BRA,45,239894,5163,BRL,Brazilian Real,R$,+55,.br,"pt-BR,es,en,fr"
29,NA,6,CA,CAN,CAN,65,65,4588,CAD,Canadian Dollar,C$,+1,.ca,"en-CA,fr-CA,iu"
35,AS,5,CN,CHN,CHN,12,239901,275,CNY,Yuan Renminbi,¥,+86,.cn,"zh-CN,yue,wuu,dta,ug,za"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: 20.33 MB
- Entries: 30.4M
Documentation for dataset contents, schema, usage, and support.
- File Size: 8.17 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": "Peking",
"de": "Peking",
"en": "Beijing",
"es": "Peking",
"fa": "",
"fr": "Municipalité de Pékin",
"it": "Pechino",
"ja": "北京",
"ko": "",
"pt": "",
"ru": "Пекин",
"zh": "北京"
},
"code2": "CN",
"code3": "CHN",
"code_ioc": "CHN",
"continent": {
"code": "AS",
"name": {
"cs": "Asie",
"de": "Asien",
"en": "Asia",
"es": "Asia",
"fa": " آسیا",
"fr": "Asie",
"it": "Asia",
"ja": "アジア",
"ko": "Ásia",
"pt": "Ásia",
"ru": "Азия",
"zh": "亚洲"
}
},
"currency": {
"code": "CNY",
"name": {
"en": "Yuan Renminbi"
},
"symbol": "¥"
},
"metadata": {
"calling_code": "+86",
"languages": "zh-CN,yue,wuu,dta,ug,za",
"tld": ".cn"
},
"name": {
"cs": "Čína",
"de": "China",
"en": "China",
"es": "China",
"fa": "چین",
"fr": "Chine",
"it": "Cina",
"ja": "中国",
"ko": "China",
"pt": "China",
"ru": "Китай",
"zh": "中国"
},
"name_official": {
"cs": "",
"de": "",
"en": "People’s Republic of China",
"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.