GeoFeed CSV Validator
A geofeed is a simple text file that tells IP geolocation services where groups of IP addresses are used. Internet providers and network operators share these files to help keep IP location data up to date. Paste your geofeed or choose a local CSV or TXT file. Our free validator checks IP addresses, country and region codes, and file formatting. The report shows which lines have errors or warnings.
Validation results
- Entries processed
- Errors
- Warnings
How to validate a geofeed
- Paste your geofeed into the text box or drop a local
.csvor.txtfile into the box or upload area. You can also use the file picker. To try the checker, start with the four-line example. - Select Validate CSV. Use the line numbers in Validation results to find records that need attention.
- Fix errors in your source file and review any warnings. Paste the revised text or load the updated file, then select Validate CSV.
Geofeed CSV example
The first line lists San Francisco as the location for one group of IP addresses. Copy all four lines into the geofeed input to try the checker. The addresses are reserved for documentation, and the locations are illustrative.
192.0.2.0/24,US,US-CA,San Francisco,
2001:db8:1::/48,JP,JP-13,Tokyo,
198.51.100.0/24,GB,,,
203.0.113.0/24,,,, You should see 4 entries processed, 0 errors and 0 warnings.
| Field | Value and meaning |
|---|---|
ip_prefix | 192.0.2.0/24 is an IP prefix, a short way to write a range of addresses. You can also enter a single address. This is the only required field. |
alpha2code | US is the two-letter country code for the United States. |
region | US-CA is the region code for California. Include the country part of the code (US in this example). |
city | San Francisco is the city the operator gives for this block. |
postal_code | Leave the postal code empty in new feeds. The comma after the city keeps its place. RFC 8805 deprecates this field. |
Line 2 lists a group of IPv6 addresses (2001:db8:1::/48) in Tokyo, Japan. The country and region codes are JP and JP-13. Line 3 gives only the country code (GB for the United Kingdom). Line 4 leaves all four location fields empty to indicate that the range should have no location assigned.
Save the file as UTF-8 text. Put each entry on one line and leave out column headings. A # starts a comment. The checker skips blank lines. It ignores fields after the fifth, but they still need valid CSV quoting. Read the geofeed CSV format in RFC 8805.
Fix an invalid IPv4 prefix
Replace the entire sample with this one line and select Validate CSV.
192.0.2.0/33,US,US-CA,San Francisco, Expect 1 entry processed, 1 error and 0 warnings. The error points to line 1. The number after the slash can be at most 32 for IPv4, so /33 is invalid. This example is meant to describe a /24 range. Replace the row with the corrected version below.
192.0.2.0/24,US,US-CA,San Francisco, Run the check again. Expect 1 entry processed, 0 errors and 0 warnings.
How to read the report
Entries processed counts the rows the checker tried to read, including rows with errors. Errors show what to fix, such as an invalid IP prefix. Warnings show what to review, such as a postal code you can leave empty. A row can have more than one issue. Line numbers start at the first line of your input and include comments and blank lines.
Validation complete means the checker finished reading the input. If the error and warning counts are zero, the file passed these checks. If you see Validation incomplete, follow the message in the report before relying on the results. Each check accepts up to 1 MiB (approximately 1 MB) of UTF-8 text and 10,000 entries.
The page shows the first 100 issues. Copy report and Download CSV report give you the summary and every issue found during that check, with a line number where available. Use the report to make corrections in your original geofeed.
Publishing your geofeed
Check the address ranges and locations against your own network records. Host the file at a stable HTTPS URL. Follow your internet registry’s instructions for linking to the file from your address records. Each provider decides whether and when to use the feed. RFC 9632 explains how providers find a feed and how optional authentication works.
Frequently asked questions
When should I validate my geofeed?
Check it before you first publish it and whenever you edit it. If you move a range to another city, for example, the checker can flag a duplicate if you add a new row and leave the old one in place.
Can I check a geofeed from a URL?
Save the file locally or paste its contents. The validator reads the text in your browser without uploading the feed or fetching its URL. The check is free and requires no API key.
Can I put IPv4 and IPv6 addresses in the same geofeed?
Yes. One file can list individual addresses and ranges for both IPv4 and IPv6. CIDR notation uses a slash and a number to show the size of a range. A /25 inside a /24 covers a smaller range, so those two entries can appear together. Listing the same range twice is an error. A single IPv4 address and its /32 form count as the same entry. For IPv6, the equivalent is /128.
Why did the checker flag my country or region code?
The checker uses a built-in list of country codes (ISO 3166-1 alpha-2) and region codes (ISO 3166-2). Uppercase and lowercase both work. An unknown code is an error. The old country marker ZZ gives a warning instead. Two valid codes that point to different countries also give a warning. You can give a region and leave the country field empty. See the code list source and version.
Why do I get a warning when my row ends after the country?
The checker treats omitted fields as empty and warns when there are fewer than five columns. For example, 198.51.100.0/24,GB produces one warning. Use 198.51.100.0/24,GB,,, to keep the three empty fields explicit, as in line 3 of the example. Those fields are for the region, city and postal code.
Can a feed have zero issues and still list the wrong city?
Yes. The checker reads the city name as text. Confirm locations against your network records. Separate checks can establish who controls an address range, whether special-purpose addresses belong in the feed and whether the optional RPKI-based signature is valid.
For location and network details in your application, see the IPWho geolocation API.