Oftentimes, web developers need a database of USPS zip codes with latitude and longitude to use in their applications. We know that a database of this type can often cost quite a bit of money. We found such a list in .csv format at federalgovernmentzipcodes.us and converted it to .sql format. This list was updated on 04/15/2009 with information obtained from the USPS. We provide two .sql versions of it here free of charge.
The full .sql file will create a MySQL table with the following fields:
Zipcode (5-digit)
Latitude(Decimal)
Longitude(Decimal)
City
State (2-letter abbreviation)
County
Zipcode Type
Primary
WorldRegion
Country
LocationText
Location
Population
HousingUnits
Income
LandArea
WaterArea
Decommisioned
MilitaryRestrictionCodes
Download zip_code_full.zip (2.24 MB)
This smaller .sql file will create a MySQL table with fewer fields:
Zipcode (5-digit)
Latitude(Decimal)
Longitude(Decimal)
City
State (2-letter abbreviation)
County
Country
Download zip_code2.zip (791 KB)