A command-line utility to verify the validity of MaxMind DB (MMDB) files.
This utility verifies that a MaxMind DB file is valid by checking:
- Search tree - Validates the tree structure used for IP lookups
- Data section - Ensures all data is properly formatted and accessible
- Metadata - Verifies metadata is well-formed and contains expected fields
If the database is valid, the tool exits silently with status code 0. If
invalid, an error description is printed to stderr and the tool exits with a
non-zero status code.
Note: This tool may flag a database as invalid even if it can be parsed. This occurs when there is unexpected or malformed data in the data section or metadata.
Download pre-built binaries from the GitHub Releases page.
Architecture Guide:
amd64= x86-64 / x64 (most common for Intel/AMD processors)arm64= ARM 64-bit (Apple Silicon, AWS Graviton, Raspberry Pi 4+)darwin= macOS
Using .deb package (Debian/Ubuntu):
# Download the .deb file for your architecture from the releases page
sudo dpkg -i mmdbverify_<VERSION>_linux_<ARCH>.debUsing .rpm package (RedHat/CentOS/Fedora):
# Download the .rpm file for your architecture from the releases page
sudo rpm -i mmdbverify_<VERSION>_linux_<ARCH>.rpmUsing tar.gz archive:
# Download and extract
tar -xzf mmdbverify_<VERSION>_linux_<ARCH>.tar.gz
sudo mv mmdbverify/mmdbverify /usr/local/bin/# Download the appropriate file for your Mac:
# - darwin_arm64 for Apple Silicon (M1/M2/M3/M4)
# - darwin_amd64 for Intel Macs
tar -xzf mmdbverify_<VERSION>_darwin_<ARCH>.tar.gz
sudo mv mmdbverify/mmdbverify /usr/local/bin/- Download the Windows zip file for your architecture from the releases page
- Extract the zip file
- Add
mmdbverify.exeto your PATH or run it directly
Using PowerShell:
# Extract
Expand-Archive -Path mmdbverify_<VERSION>_windows_<ARCH>.zip -DestinationPath .
# Run
.\mmdbverify\mmdbverify.exe -file C:\path\to\database.mmdbgo install github.com/maxmind/mmdbverify@latestgit clone https://github.com/maxmind/mmdbverify.git
cd mmdbverify
go build# Verify a database file (silent on success)
mmdbverify -file /path/to/GeoIP2-City.mmdb
# Verify with verbose output
mmdbverify -file /path/to/GeoIP2-City.mmdb -verbose
# Verifying /path/to/GeoIP2-City.mmdb...
# /path/to/GeoIP2-City.mmdb is valid
# Check exit code
echo $?
# 0
# Failure (error printed to stderr with filename, non-zero exit code)
mmdbverify -file /path/to/invalid.mmdb
# Error verifying /path/to/invalid.mmdb: invalid database metadata
echo $?
# 1-file- Required. Path to the MaxMind DB file to verify-verbose- Print verification status messages
# Silent mode (default)
mmdbverify -file GeoIP2-City.mmdb
# Verbose mode
mmdbverify -file GeoIP2-City.mmdb -verbose# Verify all MMDB files with verbose output
for db in *.mmdb; do
mmdbverify -file "$db" -verbose
done# Exit immediately if validation fails
mmdbverify -file GeoIP2-Country.mmdb || exit 1- Pre-deployment validation - Verify databases before deploying to production
- Download verification - Ensure downloaded MMDB files are not corrupted
- CI/CD pipelines - Validate databases in automated testing workflows
- Quality assurance - Check custom MMDB files created with mmdbwriter
- Go 1.24 or later (for building from source)
- MaxMind DB files to verify (GeoIP2, GeoLite2, or custom MMDB files)
- mmdbinspect - Inspect and query MMDB files
- mmdbwriter - Create custom MMDB files
- mmdbconvert - Convert MMDB to CSV/Parquet
Copyright (c) 2015-2025 by MaxMind, Inc.
This software is licensed under the Apache License, Version 2.0. See LICENSE for details.
- Issues: GitHub Issues
- MaxMind Support: https://support.maxmind.com