IP Country Database


Overview

Ever wonder what country a specific IP address comes from? Our IP to Country Database, which is part of our Geo Standard, 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
CSVCSV
  • File Size: 215.06 MB
  • Entries: 38.1M
  • Fields: 3
  • Last Updated:
MMDB
MMDBMMDB
  • File Size: 8.89 MB
  • Entries: 38.1M
  • 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, 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):

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.67 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: 32.36 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: 215.01 MB
  • Entries: 38.1M
  • Fields: 3
README.md
README.mdREADME.md

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

  • File Size: 8.00 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 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.

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
82.16.160.21,82.16.160.21,58
146.115.56.123,146.115.56.123,172
68.149.54.184,68.149.54.184,29
86.131.67.6,86.131.67.6,58
2a02:ab04:1b7:e000::7,2a02:ab04:1b7:e000::7,199
172.112.43.77,172.112.43.77,172
99.239.25.38,99.239.25.38,29
45.205.241.74,45.205.241.74,172
107.10.114.43,107.10.114.43,172
116.97.40.32,116.97.40.32,205

2. 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.

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
209032,Bay Street Corridor,Bay Street Korridor,Коридор Остров-стрит,,,ベイ・ストリート・コリドー,,Corridor de la rue Bay,湾街走廊,Koridor Bay Street,Koridor Bay Street,Corridoio di Bay Street
5,Asia,Asien,Азия,Ásia,Ásia,アジア, آسیا,Asie,亚洲,Asia,Asie,Asia
592,Wisconsin,Wisconsin,Висконсин,위스콘신 주,,ウィスコンシン州,ویسکانسین,Wisconsin,威斯康辛州,Wisconsin,Wisconsin,Wisconsin
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
29782,Bratislava,Bratislava,Братислава,브라티슬라바,Bratislava,ブラチスラヴァ,براتیسلاو,Bratislava,布拉迪斯拉发,Bratislava,Bratislava,Bratislava
362,California,Kalifornien,Калифорния,Califórnia,Califórnia,カリフォルニアだ,کالیفرنیا,Californie,加州,California,Kalifornie,California
240018,United States of America,,,,,,,,,,,
240019,"Washington, D.C.",,,,,,,,,,,
604,Alberta,Alberta,Альберта,앨버타 주,,アルバータ州,آلبرتا,Alberta,艾伯塔,Alberta,Alberta,Alberta
28607,Princeton,Princeton,Принстон,,,プリンストン,پرینستون، ایندیانا,Princeton,普林斯顿,Princetonu,Princetonu,Princeton
4386,Howard,Howard,Хауард,,Condado de Howard,ハワード郡,شهرستان هاوارد، مریلند,Comté de Howard,霍華德縣,Howarda,Howarda,Howard
28,United States,USA,США,Estados Unidos,Estados Unidos,アメリカ合衆国,ایالات متحدهٔ امریکا,États-Unis,美国,Estados Unidos,Spojené státy americké,Stati Uniti d'America
30,Vietnam,Vietnam,Вьетнам,Vietnã,Vietnã,ベトナム,ویتنام,Vietnam,越南,Vietnam,Vietnam,Vietnam
1650,London,London,Лондон,London,,ロンドン,,London,伦敦,London,Londýn,Londra
32016,Fontana,Fontana,Фонтана,폰태나,,フォンタナ,فونتانا، کالیفرنیا,Fontana,方塔納,Fontana,Fontana,Fontana
36,United Kingdom,Vereinigtes Königreich,Великобритания,Reino Unido,Reino Unido,イギリス,بریتانیا,Royaume-Uni,英国,Reino Unido,Spojené království Velké Británie a Severního Irska,Regno Unito
28365,Framingham,Framingham,Фрамингем,프레이밍햄,,フレイミングハム,فرامینگهام، ماساچوست,Framingham,弗雷明翰,Framinghamu,Framinghamu,Framingham
240040,Slovak Republic,,,,,,,,,,,
222584,Bratislava I,Bratislava I,Братислава I,,,ブラチスラヴァ,,Bratislava Ier,布拉迪斯拉发一世,Bratislava I,Bratislava,Bratislava I
5706,Mercer County,Mercer,Мерсер,,Condado de Mercer,マーサー郡,شهرستان مرسر، نیوجرسی,Comté de Mercer,默瑟县,Мерсер,Mercer County,Contea di Mercer
240046,Socialist Republic of Viet Nam,,,,,,,,,,,
384,Massachusetts,Massachusetts,Массачусетс,매사추세츠 주,,マサチューセッツ州,ماساچوست,Massachusetts,麻薩諸塞州,Massachusetts,Massachusetts,Massachusetts
239922,United Kingdom of Great Britain and Northern Ireland,,,,,,,,,,,
6676,Brown County,Brown County,Браун,,Condado de Brown,ブラウン郡,شهرستان براون، تگزاس,Comté de Brown,布朗縣,Браун,Brown County (Texas),Contea di Brown
4326,Middlesex,Middlesex,Мидлсекс,,Condado de Middlesex,ミドルセックス郡,شهرستان میدلسکس، ماساچوست,Comté de Middlesex,米德爾塞克斯縣,Middlesex,Middlesex,Middlesex
65,Canada,Kanada,Канада,Canadá,Canadá,カナダ,کانادا,Canada,加拿大,Canadá,Kanada,Canada
297,New Jersey,New Jersey,Нью-Джерси,Nova Jérsia,Nova Jérsia,ニュージャージー州,نیو جرسی,New Jersey,新泽西州,Nueva Jersey,New Jersey,New Jersey
240080,Hà Tĩnh Province,,,,,,,,,,,
3077,Ha Tinh,Ha Thin,Хатинь,,,ハティン,,Province de Hà Tĩnh,河亭市,Ha Tinh,Ha Tinh,Ha Tinh
2152,Cardiff,Cardiff,Кардифф,,,カーディフ,,Cardiff,加的夫,Cardiff,Cardiff,Cardiff
1387,Greater London,Großraum London,Гранд Лондон,,,大ロンドン市,,Grand Londres,大倫敦地區,londýnských,londýnských,Greater Londra
240081,Thành Phố Hà Tĩnh,,,,,,,,,,,
29782,Bratislava,Bratislava,Братислава,브라티슬라바,Bratislava,ブラチスラヴァ,براتیسلاو,Bratislava,布拉迪斯拉发,Bratislava,Bratislava,Bratislava
1254,Hanoi,Hanoi,Ханой,,,ハノイ,,Hanoï,河内,Hanoj,Hanoj,Hanoi
106,Slovakia,Slowakei (Slowakische Republik),Словакия,Eslováquia,Eslováquia,スロバキア (スロバキア共和国),اسلواکی,Slovaquie,斯洛伐克共和国,Eslovaquia,Slovensko,Slovacchia
4588,Ottawa,Ottawa,Оттава,Otava,Condado de Ottawa,オタワ,شهرستان اتاوا، اکلاهما,Ottawa,渥太華縣,Ottawa,Ottawa,Ottawa
478,Wales,Wales,Уэльс,,,ウェールズ,,Pays de Galles,威尔士,Gales,Wales,Galles
14554,Edmonton,Edmonton,Эдмонтон,Edmonton,,エドモントン,,Edmonton,埃德蒙顿,Edmonton,Edmonton,Edmonton
4426,San Bernardino County,San Bernardino,Сан-Бернардино,샌버너디노 군,Condado de San Bernardino,サンバーナーディーノ郡,شهرستان سن برناردینو، کالیفرنیا,Comté de San Bernardino,聖貝納迪諾縣,Сан-Бернардино,San Bernardino County,Contea di San Bernardino
240078,Bratislava Region,,,,,,,,,,,
597,Ontario,Ontario,Онтарио,Ontário,Ontário,オンタリオ州,انتاریو,Ontario,安大略,V Ontariu,V Ontariu,Ontario
1650,London,London,Лондон,London,,ロンドン,,London,伦敦,London,Londýn,Londra
240079,Toronto county,,,,,,,,,,,
360,England,England,Англия,Inglaterra,Inglaterra,イングランド,انگلستان,Angleterre,英格兰,Inglaterra,Anglie,Inghilterra

3. 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.

FieldTypeDescriptionCan be empty?Example
idnumberThe 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.NoUnited States 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
languagesstringThe official languages spoken in the country, represented as a comma-separated list of ISO 639-1 codes.Noen,es

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
172,NA,6,US,USA,USA,28,240018,240019,USD,US Dollar,$,+1,.us,"en-US,es-US,haw,fr"
58,EU,7,GB,GBR,GBR,36,239922,1650,GBP,Pound Sterling,£,+44,.uk,"en-GB,cy-GB,gd"
199,EU,7,SK,SVK,SVK,106,240040,29782,EUR,Euro,€,+421,.sk,"sk,hu"
205,AS,5,VN,VNM,VIE,30,240046,1254,VND,Vietnamese Dong,₫,+84,.vn,"vi,en,fr,zh,km"
29,NA,6,CA,CAN,CAN,65,65,4588,CAD,Canadian Dollar,C$,+1,.ca,"en-CA,fr-CA,iu"

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.

Image

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):

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: 22.86 MB
  • Entries: 38.1M
README.md
README.mdREADME.md

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

  • File Size: 8.48 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.

Showing 0 of 18
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).North America
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).United States
location.country.name_officialobjectThe official name of the country in multiple languages (English, German, Russian, Korean, Portuguese, Japanese, Persian, French, Chinese, Spanish, Czech, Italian).United States of 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).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.namestringThe name of the currency.United States 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.ru,en,es etc

I. Example Records

Example
{
  "location": {
    "country": {
      "capital": {
        "cs": "Londýn",
        "de": "London",
        "en": "London",
        "es": "London",
        "fa": "",
        "fr": "London",
        "it": "Londra",
        "ja": "ロンドン",
        "ko": "London",
        "pt": "",
        "ru": "Лондон",
        "zh": "伦敦"
      },
      "code2": "GB",
      "code3": "GBR",
      "code_ioc": "GBR",
      "continent": {
        "code": "EU",
        "name": {
          "cs": "Evropa",
          "de": "Europa",
          "en": "Europe",
          "es": "Europa",
          "fa": " اروپا",
          "fr": "Europe",
          "it": "Europa",
          "ja": "ヨーロッパ",
          "ko": "Europa",
          "pt": "Europa",
          "ru": "Европа",
          "zh": "欧洲"
        }
      },
      "currency": {
        "code": "GBP",
        "name": {
          "en": "Pound Sterling"
        },
        "symbol": "£"
      },
      "metadata": {
        "calling_code": "+44",
        "languages": "en-GB,cy-GB,gd",
        "tld": ".uk"
      },
      "name": {
        "cs": "Spojené království Velké Británie a Severního Irska",
        "de": "Vereinigtes Königreich",
        "en": "United Kingdom",
        "es": "Reino Unido",
        "fa": "بریتانیا",
        "fr": "Royaume-Uni",
        "it": "Regno Unito",
        "ja": "イギリス",
        "ko": "Reino Unido",
        "pt": "Reino Unido",
        "ru": "Великобритания",
        "zh": "英国"
      },
      "name_official": {
        "cs": "",
        "de": "",
        "en": "United Kingdom of Great Britain and Northern Ireland",
        "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:

  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.
  • 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:

  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, 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.

Subscribe to Our Newsletter

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