IP to Country Database Documentation


Overview

Our IP to Country Database is the most accurate way to find the country behind any IPv4 or IPv6 address. Part of the Geo Standard tier, it gives you far more than a country name: ISO codes, the continent, capital, dialing codes, currencies, languages, and TLDs, with place names in multiple languages.

We update it daily, and every location goes through our own multi-step pipeline, including active measurement. Depending on your plan, you get a fresh download daily or weekly. The files are lightweight and ready to import straight into your systems.

This documentation covers what's in each archive, the file structure, how to verify your downloads before you import them, and example records.


Available Database Formats

CSV
CSVCSV
  • File Size: 241.18 MB
  • Entries: 42.6M
  • Fields: 3
  • Last Updated:
MMDB
MMDBMMDB
  • File Size: 11.44 MB
  • Entries: 42.6M
  • Fields: 3
  • Last Updated:

CSV Database Documentation


1. Overview

The CSV version is delivered as a ZIP archive that includes Gzip-compressed files with IP ranges, country details, and multilingual country, capital, and continent 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):

db-country.csv.gz
db-country.csv.gzdb-country.csv.gz

Standardized country and continent metadata with codes, currency, calling codes, TLDs, and languages.

  • File Size: 9.68 KB
  • Entries: 254
  • Fields: 15
db-place.csv.gz
db-place.csv.gzdb-place.csv.gz

Multilingual place names for cities, districts, states, countries, and continents.

  • File Size: 45.90 KB
  • Entries: 690
  • Fields: 13
db-ip-country.csv.gz
db-ip-country.csv.gzdb-ip-country.csv.gz

IP ranges mapping to country IDs for linking each address block with standardized country details and metadata.

  • File Size: 241.12 MB
  • Entries: 42.6M
  • Fields: 3
README.md
README.mdREADME.md

Documentation for dataset contents, schema, usage, and support.

  • File Size: 8.01 KB
checksum.txt
checksum.txtchecksum.txt

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 maps each IPv4 and IPv6 range to a country ID. Join country_id to the id column in db-country.csv.gz to retrieve country details.

FieldTypeDescriptionCan Be Empty?Example
start_ipstringThe starting IP address of the range in IPv4 or IPv6 format.No192.168.0.1
end_ipstringThe ending IP address of the range in IPv4 or IPv6 format.No192.168.0.255
country_idnumberThe unique identifier for the country associated with the IP range.No192

I. Example Records

Example
start_ip,end_ip,country_id
77.129.52.16,77.129.52.16,56
97.118.12.236,97.118.12.236,172
184.65.138.115,184.65.138.115,29
89.40.95.21,89.40.95.21,140
122.6.134.147,122.6.134.147,35
74.88.172.50,74.88.172.50,172
90.254.244.0,90.254.244.0,58
82.3.197.16,82.3.197.16,58
102.56.230.112,102.56.230.112,49
2601:40:c500:50:7db4:c732:9a1a:e78b,2601:40:c500:50:7db4:c732:9a1a:e78b,172

2. db-place.csv.gz

This file contains multilingual names for countries, official country names, capitals, and continents. It serves as the reference dictionary for the IP to Country Database, allowing you to resolve place IDs into multilingual responses across different regions and languages.

FieldTypeDescriptionCan Be Empty?Example
idnumberThe unique identifier for the place.No5375480
place_englishstringThe name of the place in English.NoMountain View
place_germanstringThe name of the place in German.YesMountain View
place_russianstringThe name of the place in Russian.YesМаунтин-Вью
place_koreanstringThe name of the place in Korean.Yes마운틴 뷰
place_portuguesestringThe name of the place in Portuguese.YesMountain View
place_japanesestringThe name of the place in Japanese.Yesマウンテンビュー
place_persianstringThe name of the place in Farsi.Yesماونتین ویو
place_frenchstringThe name of the place in French.YesMountain View
place_chinesestringThe name of the place in Chinese.Yes山景城
place_spanishstringThe name of the place in Spanish.YesMountain View
place_czechstringThe name of the place in Czech.YesMountain View
place_italianstringThe name of the place in Italian.YesMountain View

I. Example Records

Example
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
6,Asia,Asien,Азия,아시아,Ásia,アジア,آسیا,Asie,亚洲,Asia,Asie,Asia
7,North America,Nordamerika,Северная Америка,북아메리카,América do Norte,北アメリカ,آمریکای شمالی,Amérique du Nord,北美洲,América del Norte,Severní Amerika,America del Nord
8,Europe,Europa,Европа,유럽,Europa,ヨーロッパ,اروپا,Europe,欧洲,Europa,Evropa,Europa
10,Africa,Afrika,Африка,아프리카,África,アフリカ,آفریقا,Afrique,非洲,África,Afrika,Africa
266,Beijing,Peking,Пекин,베이징,Pequim,北京,پکن,Pékin,北京,Pekín,Peking,Pechino
28684,Bucharest,Bukarest,Бухарест,부카레스트,Bucareste,ブカレスト,بخارست,Bucarest,布加勒斯特,Bucarest,Bukurešť,Bucarest
13,China,China,Китай,중국,China,中国,چین,Chine,中国,China,Čína,Cina
22,France,Frankreich,Франция,프랑스,França,フランス,فرانسه,France,法国,Francia,Francie,Francia
240027,United States of America,Vereinigte Staaten von Amerika,Соединённые Штаты Америки,미국,Estados Unidos da América,アメリカ合衆国,ایالات متحده آمریکا,États-Unis d'Amérique,美利坚合众国,Estados Unidos de América,Spojené státy americké,Stati Uniti d'America
27,United Kingdom,Vereinigtes Königreich,Великобритания,영국,Reino Unido,イギリス,بریتانیا,Royaume-Uni,英国,Reino Unido,Spojené království,Regno Unito
240028,"Washington, D.C.","Washington, D.C.",Вашингтон,워싱턴 D.C.,"Washington, D.C.",ワシントンD.C.,واشنگتن دی.سی.,"Washington, D.C.",华盛顿哥伦比亚特区,"Washington, D.C.","Washington, D.C.","Washington, D.C."
239910,People’s Republic of China,Volksrepublik China,Китайская Народная Республика,중화인민공화국,República Popular da China,中華人民共和国,جمهوری خلق چین,République populaire de Chine,中华人民共和国,República Popular China,Čínská lidová republika,Repubblica Popolare Cinese
39,United States,Vereinigte Staaten,Соединенные Штаты,미국,Estados Unidos,アメリカ合衆国,ایالات متحده آمریکا,États-Unis,美国,Estados Unidos,Spojené státy americké,Stati Uniti
3630,Paris,Paris,Париж,파리,Paris,パリ,پاریس,Paris,巴黎,París,Paříž,Parigi
239922,Arab Republic of Egypt,Arabische Republik Ägypten,Арабская Республика Египет,이집트 아랍 공화국,República Árabe do Egito,エジプト・アラブ共和国,جمهوری عرب مصر,République arabe d'Égypte,埃及阿拉伯共和国,República Árabe de Egipto,Egyptská arabská republika,Repubblica Araba d'Egitto
239929,Republic of France,Republik Frankreich,Французская Республика,프랑스 공화국,República Francesa,フランス共和国,جمهوری فرانسه,République française,法兰西共和国,República Francesa,Francouzská republika,Repubblica francese
239931,United Kingdom of Great Britain and Northern Ireland,Vereinigtes Königreich von Großbritannien und Nordirland,Соединённое Королевство Великобритании и Северной Ирландии,그레이트브리튼 및 북아일랜드 연합 왕국,Reino Unido da Grã-Bretanha e Irlanda do Norte,イギリス,بریتانیای کبیر و ایرلند شمالی,Royaume-Uni de Grande-Bretagne et d'Irlande du Nord,大不列颠及北爱尔兰联合王国,Reino Unido de Gran Bretaña e Irlanda del Norte,Spojené království Velké Británie a Severního Irska,Regno Unito di Gran Bretagna e Irlanda del Nord
66,Canada,Kanada,Канада,캐나다,Canadá,カナダ,کانادا,Canada,加拿大,Canadá,Kanada,Canada
78,Romania,Rumänien,Румыния,루마니아,Romênia,ルーマニア,رومانی,Roumanie,罗马尼亚,Rumanía,Rumunsko,Romania
88,Egypt,Ägypten,Египет,이집트,Egito,エジプト,مصر,Égypte,埃及,Egipto,Egypt,Egitto
735,Cairo,Kairo,Каир,카이로,Cairo,カイロ,قاهره,Le Caire,开罗,El Cairo,Káhira,Il Cairo
4586,Ottawa,Ottawa,Оттава,오타와,Ottawa,オタワ,اتاوا,Ottawa,渥太华,Ottawa,Ottawa,Ottawa
1650,London,London,Лондон,런던,Londres,ロンドン,لندن,Londres,伦敦,Londres,Londýn,Londra

3. db-country.csv.gz

This file contains standardized country metadata for the IP to Country 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.

FieldTypeDescriptionCan Be Empty?Example
idstringThe unique identifier for the country.No192
continent_codestringThe continent code associated with the country.NoNA
continent_name_place_idnumberThe unique identifier for the continent place.No6255148
country_code2stringThe ISO 3166-1 alpha-2 code of the country.NoUS
country_code3stringThe ISO 3166-1 alpha-3 code of the country.NoUSA
country_code_iocstringThe IOC country code.NoUSA
country_name_place_idnumberThe unique identifier for the country place.No6252001
country_name_official_place_idnumberThe unique identifier for the official country place.No6252001
country_capital_place_idnumberThe unique identifier for the capital place.No5375480
currency_codestringThe ISO 4217 currency code of the country.NoUSD
currency_namestringThe name of the currency used in the country.NoUS Dollar
currency_symbolstringThe symbol of the currency used in the country.No$
calling_codestringThe international calling code of the country.No+1
tldstringThe top-level domain (TLD) of the country.No.us
languagesstringLanguages spoken in the country, represented as a comma-separated list of BCP 47 / IETF language tagsNoen-US,es-US,haw,fr

I. Example Records

Example
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
49,AF,10,EG,EGY,EGY,88,239922,735,EGP,Egyptian Pound,E£,+20,.eg,"ar-EG,en,fr"
140,EU,8,RO,ROU,ROU,78,78,28684,RON,Romanian Leu,lei,+40,.ro,"ro,hu,rom"
29,NA,7,CA,CAN,CAN,66,66,4586,CAD,Canadian Dollar,C$,+1,.ca,"en-CA,fr-CA,iu"
58,EU,8,GB,GBR,GBR,27,239931,1650,GBP,Pound Sterling,£,+44,.uk,"en-GB,cy-GB,gd"
35,AS,6,CN,CHN,CHN,13,239910,266,CNY,Yuan Renminbi,¥,+86,.cn,"zh-CN,yue,wuu,dta,ug,za"
56,EU,8,FR,FRA,FRA,22,239929,3630,EUR,Euro,€,+33,.fr,"fr-FR,frp,br,co,ca,eu,oc"
172,NA,7,US,USA,USA,39,240027,240028,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 db-ip-country.csv.gz joins to db-country.csv.gz, which joins to db-place.csv.gz for multilingual country, capital and continent names.

CSV file relationships in the IP-to-country database

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.
  • Lists of values.
  • Spaces that may be auto-quoted by export tools.

MMDB Database Documentation


1. Overview

The MMDB version of our IP to Country Database 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):

db-ip-country.mmdb
db-ip-country.mmdbdb-ip-country.mmdb

Country-level geolocation database with IP ranges, multilingual country names, codes, capital, currency, languages, and related metadata.

  • File Size: 29.83 MB
  • Entries: 42.6M
README.md
README.mdREADME.md

Documentation for dataset contents, schema, usage, and support.

  • File Size: 8.41 KB
checksum.txt
checksum.txtchecksum.txt

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.

18 fields
Select a field to view details
FieldTypeDescriptionExample
locationobject
location.countryobjectThe name of the country in multiple languages.
location.country.continentobjectThe name of the continent in multiple languages.
location.country.continent.nameobjectThe name of the continent in multiple languages (English, German, Russian, Korean, Portuguese, Japanese, Persian, French, Chinese, Spanish, Czech, Italian).{"en":"North America","de":"Nordamerika","ru":"Северная Америка","ko":"북아메리카","pt":"América do Norte","ja":"北アメリカ","fa":"شمال آمریکا","fr":"Amérique du Nord","zh":"北美洲","es":"América del Norte","cs":"Severní Amerika","it":"America del Nord"}
location.country.continent.codestringThe two-letter code representing the continent.NA
location.country.nameobjectThe name of the country in multiple languages (English, German, Russian, Korean, Portuguese, Japanese, Persian, French, Chinese, Spanish, Czech, Italian).{"en":"United States","de":"Vereinigte Staaten","ru":"Соединенные Штаты","ko":"미국","pt":"Estados Unidos","ja":"アメリカ合衆国","fa":"ایالات متحده آمریکا","fr":"États-Unis","zh":"美国","es":"Estados Unidos","cs":"Spojené státy","it":"Stati Uniti"}
location.country.name_officialobjectThe official name of the country in multiple languages (English, German, Russian, Korean, Portuguese, Japanese, Persian, French, Chinese, Spanish, Czech, Italian).{"en":"United States of America","de":"Vereinigte Staaten von Amerika","ru":"Соединенные Штаты Америки","ko":"미국","pt":"Estados Unidos da América","ja":"アメリカ合衆国","fa":"ایالات متحده آمریکا","fr":"États-Unis d'Amérique","zh":"美利坚合众国","es":"Estados Unidos de América","cs":"Spojené státy americké","it":"Stati Uniti d'America"}
location.country.code2stringThe two-letter code representing the country.US
location.country.code3stringThe three-letter code representing the country.USA
location.country.code_iocstringThe International Olympic Committee (IOC) code representing the country.USA
location.country.capitalobjectThe capital city of the country in multiple languages (English, German, Russian, Korean, Portuguese, Japanese, Persian, French, Chinese, Spanish, Czech, Italian).{"en":"Washington, D.C.","de":"Washington, D.C.","ru":"Вашингтон, округ Колумбия","ko":"워싱턴 D.C.","pt":"Washington, D.C.","ja":"ワシントンD.C.","fa":"واشنگتن دی سی","fr":"Washington, D.C.","zh":"华盛顿特区","es":"Washington D.C.","cs":"Washington, D.C.","it":"Washington D.C."}
location.country.currencyobjectThe currency used in the country.
location.country.currency.codestringThe three-letter code representing the currency, following ISO 4217 standards.USD
location.country.currency.symbolstringThe symbol representing the currency.$
location.country.currency.nameobjectThe name of the currency.{"en":"US Dollar"}
location.country.metadataobject Additional metadata about the country.
location.country.metadata.calling_codestringThe international calling code for the country.+1
location.country.metadata.tldstringThe top-level domain (TLD) for the country..us
location.country.metadata.languagesstringThe languages spoken in the country.en-US,es-US,haw,fr

I. Example Records

Example
{
  "location": {
    "country": {
      "capital": {
        "cs": "Paříž",
        "de": "Paris",
        "en": "Paris",
        "es": "París",
        "fa": "پاریس",
        "fr": "Paris",
        "it": "Parigi",
        "ja": "パリ",
        "ko": "파리",
        "pt": "Paris",
        "ru": "Париж",
        "zh": "巴黎"
      },
      "code2": "FR",
      "code3": "FRA",
      "code_ioc": "FRA",
      "continent": {
        "code": "EU",
        "name": {
          "cs": "Evropa",
          "de": "Europa",
          "en": "Europe",
          "es": "Europa",
          "fa": "اروپا",
          "fr": "Europe",
          "it": "Europa",
          "ja": "ヨーロッパ",
          "ko": "유럽",
          "pt": "Europa",
          "ru": "Европа",
          "zh": "欧洲"
        }
      },
      "currency": {
        "code": "EUR",
        "name": {
          "en": "Euro"
        },
        "symbol": "€"
      },
      "metadata": {
        "calling_code": "+33",
        "languages": "fr-FR,frp,br,co,ca,eu,oc",
        "tld": ".fr"
      },
      "name": {
        "cs": "Francie",
        "de": "Frankreich",
        "en": "France",
        "es": "Francia",
        "fa": "فرانسه",
        "fr": "France",
        "it": "Francia",
        "ja": "フランス",
        "ko": "프랑스",
        "pt": "França",
        "ru": "Франция",
        "zh": "法国"
      },
      "name_official": {
        "cs": "Francouzská republika",
        "de": "Republik Frankreich",
        "en": "Republic of France",
        "es": "República Francesa",
        "fa": "جمهوری فرانسه",
        "fr": "République française",
        "it": "Repubblica francese",
        "ja": "フランス共和国",
        "ko": "프랑스 공화국",
        "pt": "República Francesa",
        "ru": "Французская Республика",
        "zh": "法兰西共和国"
      }
    }
  }
}

Database Integrity & Authenticity Verification

There are two ways to verify the integrity and authenticity of our databases:


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:

  1. Database file (the downloaded archive)
  2. Signature file (the matching signature for that archive)
  3. 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.
  • Country, capital and continent names 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:

  1. Database Archive URL: downloads the latest release of your subscribed database (CSV, MMDB or requested formats).
  2. Signature File URL: downloads the matching signature file for the latest release (used for authenticity verification).
  3. Public Key URL: downloads the public verification key (used with the signature file).
  4. Status Endpoint URL: returns the database's most recent update timestamp.

Our databases are updated continuously and shipped on a daily or weekly cycle depending on your plan. 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.

Subscribe to Our Newsletter

Get the latest in geolocation tech, straight to your inbox.