GeoIP2 User Count Database

In addition to our MaxMind DB binary format, we also offer GeoIP2 databases in a CSV format suitable for importing into a SQL database. This documentation details the format of those CSV files. The CSV files are shipped as a single zip file.

Zip File

The zip file itself is named GeoIP2-UserCount-CSV_{YYYYMMDD}.zip. The downloaded zip file contains a single directory which in turn contains several files. That directory is named GeoIP2-UserCount-CSV_{YYYYMMDD}.

The files in this zip archive are:

FilenameDescription
LICENSE.txt End user license
COPYRIGHT.txt Copyright statement
GeoIP2-UserCount-Blocks-IPv4.csv CSV file containing data on IPv4 addresses
GeoIP2-UserCount-Blocks-IPv6.csv CSV file containing data on IPv6 addresses

Example File

This example file contains CSVs containing non-representative records for testing purposes – GeoIP2-UserCount-CSV_Example. The data represented in the CSVs are as follows:

IP address User Count
1.2.3.43
1.2.3.51
2001:edb8:0001:0000::1
2001:edb8:85a3:0000::3
2001:edb8:85a3:0001::1

CSV File Format

There are two CSV files for network blocks, one each for IPv4 and IPv6 blocks. These files are named GeoIP2-UserCount-Blocks-IPv4.csv and GeoIP2-UserCount-Blocks-IPv6.csv respectively.

The CSV files starts with a single header row containing column names. The specific column names and their contents are detailed below. The files are encoded as UTF-8.

IPv4 file

Name Type Description
network IP network as a string This is the IPv4 in CIDR format such as “2.21.92.0/29”. We offer a utility to convert this column to start/end IPs or start/end integers. See the conversion utility section for details.
ipv4_24 integer A user count for a /24 network is the number of distinct users encountered across all addresses within the /24 network; This value may be less than the sum of the user counts for all IPv4 addresses contained in the /24 since the same users may be encountered multiple times within the /24. Each IPv4 address contained within the network this row pertains to belongs to an /24 network that has an identical user count which is the value in this column.
ipv4_32 integer The user count for each individual IPv4 address. Each IPv4 address contained within the network this row pertains to has an identical individual user count which is contained in this column.
ipv6_32 empty This value is always blank for the IPv4 block file.
ipv6_48 empty This value is always blank for the IPv4 block file.
ipv6_64 empty This value is always blank for the IPv4 block file.

IPv6 file

Name Type Description
network IP network as a string This is the IPv6 in CIDR format such as “2001:4b0::/80”. We offer a utility to convert this column to start/end IPs or start/end integers. See the conversion utility section for details.
ipv4_24 empty This value is always blank for the IPv6 block file.
ipv4_32 empty This value is always blank for the IPv6 block file.
ipv6_32 integer A user count for a /32 network is the number of distinct users encountered across all addresses within the /32 network; This value may be less than the sum of the user counts for all IPv6 addresses contained in the /32 since the same users may be encountered multiple times within the /24. Each IPv4 address contained within the network this row pertains to belongs to an /32 network that has an identical user count which is the value in this column.
ipv6_48 integer A user count for a /48 network is the number of distinct users encountered across all addresses within the /48 network; This value may be less than the sum of the user counts for all IPv6 addresses contained in the /48 since the same users may be encountered multiple times within the /48. Each IPv6 address contained within the network this row pertains to belongs to an /48 network that has an identical user count which is the value in this column.
ipv6_64 integer A user count for a /64 network is the number of distinct users encountered across all addresses within the /64 network; This value may be less than the sum of the user counts for all IPv6 addresses contained in the /64 since the same users may be encountered multiple times within the /64. Each IPv6 address contained within the network this row pertains to belongs to an /64 network that has an identical user count which is the value in this column.

Conversion Utility

We’ve created a small utility program to allow you to convert a GeoIP2 CSV file’s representation of IP addresses to another format. You can choose between start/end IP addresses, with the addresses represented as strings or integers.

The program is available from our geoip2-csv-converter GitHub project releases tab.