ZIP code to county list for every US state
Every US ZIP code with its county and county FIPS code in one file, or one file per state. Updated 19 November 2026.
What is in the file
One row for each of 40,977 ZIP codes in the 50 states and the District of Columbia, with the place name, the county it is assigned to, the five-digit county FIPS code and an approximate latitude and longitude. The codes are assigned to 3,147 different counties and county equivalents. Texas has the most ZIP codes (2,600), then California (2,593) and Pennsylvania (2,176); Rhode Island has the fewest (90).
Military APO, FPO and DPO codes and the territories are left out, because they have no county. Each ZIP code is given one county, the one GeoNames assigns. A ZIP code is a delivery route rather than a boundary, so a few hundred ZIP codes also reach into a neighbouring county; for those, the county here is the main one, not the only one.
Use it to add a county to your data
Most address files have a ZIP code but no county. Join on the zip column and you get the county name and FIPS code, which is the key that Census, BLS and election files use. Keep zip as text so codes that begin with 0, as in New England and New Jersey, keep their leading zero.
import pandas as pd
z = pd.read_csv("us-zip-codes.csv", dtype={"zip": str, "county_fips": str})
customers = customers.merge(z[["zip", "county", "county_fips"]], on="zip", how="left")-- SQL: count customers per county
SELECT z.county_fips, z.county, z.state, COUNT(*) AS customers
FROM customers c
JOIN us_zip_codes z ON z.zip = c.zip
GROUP BY z.county_fips, z.county, z.state
ORDER BY customers DESC;ZIP codes by state
No state matches.
Data dictionary
| Column | Type | Meaning |
|---|---|---|
| zip | text | Five-digit ZIP code |
| place | text | Place name used by the postal service |
| county | text | County or county equivalent the ZIP code is assigned to |
| county_fips | text | Five-digit county FIPS code |
| state | text | Two-letter state code |
| state_name | text | State name |
| latitude | number | Approximate centre (GeoNames estimate) |
| longitude | number | Approximate centre (GeoNames estimate) |