NEW Geloky now works inside Claude, ChatGPT and Cursor. See how Geloky inside Claude & ChatGPT →
  1. Help
  2. US county database

How to use the US county database

Pick a version, download it, and open it in Excel or load it into your database, with the commands to copy. Then get every release for 12 months at the same link.

Updated

1

Pick a version

Free holds the 3,144 counties and county equivalents of the 50 states and DC, each with its FIPS code, centre point, population and time zone. Pro adds Puerto Rico’s municipios and the Island Areas, 3,235 in all, and more columns: land area, metro area, every time zone and each county’s ZIP codes. Complete adds who lives there and the outline of every county.

  • Free is for any project, commercial ones too, with a link to the database’s page where people can see it.
  • Pro and Complete need no link: use them across your organisation, in your websites and apps too.
  • Free’s columns come first in Pro and Complete, in the same order, so a formula or a query keeps working when you move up.
  • Need ZIP codes and cities too? All three US databases, each in its Complete version, cost $199 together instead of $297.
Free · $03,144 counties
Pro · $493,235 counties
Complete · $99Pro + demographics and outlines
2

Download your files

The free version downloads at once: a zip with the CSV, the Excel file and a README. For Pro or Complete, FastSpring’s checkout opens on the page. Once you have paid, the page turns into your download page, and a private link to it comes by email.

  • No Geloky account needed. Keep the email: its link is your download page for 12 months.
  • Each format downloads on its own, or take them all in one zip.
  • Lost the link? Find my downloads sends it again to the email you paid with.
CSVus-counties-pro.csv · 0.8 MB
Download
Excelus-counties-pro.xlsx · 0.5 MB
Download
SQLMySQL and PostgreSQL · 0.5 MB zip
Download
JSONus-counties-pro.json · 1.7 MB
Download
Download all formats (.zip)
3

Open it in Excel or Google Sheets

Open the Excel file as it is: its FIPS codes are stored as text, so 01001 keeps its leading zero. To add a county’s population or time zone to your own list, put the database on a sheet named Counties and look each FIPS code up:

=XLOOKUP(TEXT(A2,"00000"), Counties!A:A, Counties!H:H, "not found")
  • Column H is population. Use I for the time zone, or C for the full name.
  • TEXT(A2,"00000") turns a FIPS code your list stores as a number, like 6037, back into 06037.
  • Have names, not codes? In Excel 365, =XLOOKUP(A2&B2, Counties!C:C&Counties!D:D, Counties!A:A) finds the FIPS code of Cook County (A2) in IL (B2).
  • Opening the CSV instead? Use Data › From Text/CSV and set county_fips to Text, or Excel drops the zeros.
  • In Google Sheets, upload the Excel file: its FIPS codes stay text, and the first XLOOKUP works.
fx=XLOOKUP(TEXT(A2,"00000"), Counties!A:A, Counties!H:H, "not found")
FIPSSalesPopulation
17031$84,2005,182,090
06037$127,9009,808,667
48201$61,4504,838,303
4

Load it into a database

The SQL zip holds one file for MySQL and MariaDB, and one for PostgreSQL. Each creates a table named us_counties, with the FIPS code as its key, and fills it:

mysql -u you -p yourdb < us-counties-pro-mysql.sql
psql -d yourdb -f us-counties-pro-postgresql.sql

Then ask it what you need, such as the counties of the Chicago metro area, largest first:

SELECT county_full, state_id, population
FROM us_counties WHERE metro_code = '16980'
ORDER BY population DESC;
  • A column with several values separates them with |: a county’s ZIP codes in zip_codes, its time zones in timezone_all.
  • TRUE and FALSE load as booleans. A value the sources don’t have is NULL.
  • Loading a new release? Drop the old table first: DROP TABLE us_counties;
county_fullstate_idpopulation
Cook CountyIL5,182,090
DuPage CountyIL930,024
Lake CountyIL714,223
Will CountyIL701,462
Kane CountyIL517,255
13 rows: the Chicago-Naperville-Elgin, IL-IN metro area
5

Use the JSON or the county outlines

The JSON file is one array with an object for each county, under the same names as the CSV columns. Complete adds the outline of each of the 3,235 counties, as GeoJSON and KML, for maps in QGIS, Google Earth, Leaflet or MapLibre.

  • In the JSON, numbers are numbers, FIPS codes are strings, and a missing value is null.
  • Each outline carries county_fips and county_full, to join it to the table.
  • The outlines are detailed: about 23 MB as GeoJSON. For a web map, simplify them first, with mapshaper for example.
us-county-outlines.geojson · the 3,235 counties, each with its county_fips
6

Get each update

For 12 months, every new release comes to the same link, and we email you when one is out. We aim to publish a release every quarter, with the ZIP codes of each county. The Census figures change once a year, and county lines rarely.

  • Your download page lists every release you can get, newest first.
  • Bought Pro? Upgrade to Complete on that page for the $50 difference. Your updates keep their end date.
  • After the 12 months, everything you downloaded stays yours; only new releases stop.
VersionPro
Newest release4 Dec 2026
Updates until4 Dec 2027
Upgrade to Complete · $50

FAQ

Common questions

Still stuck? Write to hello@geloky.com — a person answers within a day.

Free holds the 50 states and DC. Pro and Complete add Puerto Rico’s 78 municipios and the 13 county equivalents of the Island Areas: American Samoa’s districts and islands, Guam, the Northern Mariana Islands’ municipalities and the three main US Virgin Islands. The Island Areas come without population: the Census Bureau’s survey doesn’t cover them.

Your first 100 rows are free. Every day.

Free plan, no credit card · See your results on a map before you pay