Skip to main content

IP to Country database Free download

Our free IP to Country database provides accurate country-level geolocation for any IP address. It's updated daily and uses the same high-quality data that powers our production API, ensuring you get reliable results.

Unlike many competing free databases that offer reduced accuracy, our free data comes from the same source as our premium products. This makes it a perfect drop-in replacement for GeoLite or other free alternatives, giving you better data without the cost.

Data fields

The IP to Country database includes the following data fields for each IP network range.

AttributeDescriptionExample
networkThe IP address range in CIDR notation.1.178.160.0/20
countryThe full name of the country.Australia
country_codeThe two-letter ISO 3166-1 alpha-2 country code.AU
continent_codeThe two-letter continent code.OC

Example

Look up an IP address using the MMDB database

Here's how to perform a local lookup using our MMDB database file with Node.js.

get_country_from_ip_address.js
import fs from 'fs';
import * as mmdb from 'mmdb-lib'; // npm install mmdb-lib

const db = fs.readFileSync('/path/to/ip-to-country.mmdb');

const reader = new mmdb.Reader(db);
console.log(reader.get('8.8.8.8'));
// {
// continent_code: 'NA',
// country_code: 'US',
// country_name: 'United States',
// network: '8.8.0.0/17'
// }

console.log(reader.getWithPrefixLength('8.8.8.8'));
// [
// {
// continent_code: 'NA',
// country_code: 'US',
// country_name: 'United States',
// network: '8.8.0.0/17'
// },
// 17
// ]

Free database comparison

Our free databases offer a powerful, no-cost alternative to other providers. Here's how we stack up:

IPinfo LiteMaxMind GeoLiteIP2Location LITEIPLocate
Download with no sign-upSign-up requiredSign-up requiredSign-up required✅ Available on GitHub
Same accuracy as paid dataReduced accuracySignificantly reduced accuracySignificantly reduced accuracy✅ Up to single-IP accuracy
Open licenseRestricted licenseRestricted license
Updated dailyTwice weeklyMonthly
IPv6 supported✅ (Separate DB)
MMDB format available
GeoLite-compatible