Counties, Parishes, Boroughs and Independent Cities: County Data for Developers
Published November 15, 2026 by the USA Address Generator editorial team · Data Quality · 8 min read
Not every state has counties, some cities belong to none, and county names repeat across the country. How county equivalents and FIPS codes work, and how to store county data without the usual bugs.
The county is not part of a postal address. USPS does not need it to deliver mail, and it is never printed on an envelope. Applications need it anyway: sales tax, insurance rating, court jurisdiction, public health reporting and election data are all organised by county. The complication is that "county" is not a uniform thing across the United States, and code that assumes it is breaks in specific, predictable states.
Not everything is called a county
The Census Bureau uses the phrase "county or county equivalent" for the layer of geography directly below the state. There are a little over 3,100 of them in the fifty states and the District of Columbia, and they go by several names.
| Where | What the unit is called |
|---|---|
| 48 states | County |
| Louisiana | Parish. There are 64. |
| Alaska | Borough, for the organised parts of the state. The remainder, called the Unorganized Borough, is divided by the Census Bureau into census areas for statistical purposes. |
| Virginia | Counties, plus 38 independent cities that are not part of any county. |
| Maryland, Missouri, Nevada | Counties, plus one independent city each: Baltimore, St. Louis and Carson City. |
| District of Columbia | The District itself is treated as a single county equivalent. |
| Connecticut | Eight historical counties, which have had no county government since 1960. For statistics, the Census Bureau now uses the state's nine planning regions as the county equivalents. |
| Puerto Rico | Municipio. There are 78. |
Two practical consequences. A label that says "County" on a form is wrong for a customer in Louisiana or Alaska; "County or parish" is safer, and many forms simply leave the field out and derive it. And a list of counties compiled a few years ago may disagree with a current one, as it will for Connecticut.
Independent cities
An independent city is legally separate from any county. This catches out any data model that says "every city is in a county".
- Virginia has 38 of them, including Richmond, Norfolk, Virginia Beach and Alexandria. Several share a name with a neighbouring county that they are not part of: the City of Richmond is distinct from Richmond County, which is elsewhere in the state; the City of Fairfax is surrounded by Fairfax County and is not in it; and Roanoke and Franklin exist both as cities and as separate counties.
- Baltimore City is not in Baltimore County. They are neighbours with separate governments and separate tax rates.
- St. Louis City is not in St. Louis County, for the same reason.
- Carson City, Nevada, is a consolidated municipality that is its own county equivalent.
For tax and jurisdiction, the distinction is the whole point: an address in the City of St. Louis and an address in St. Louis County are in different jurisdictions even when they are a few streets apart. A county column that holds "St. Louis" for both is ambiguous.
The reverse case also exists. Some cities have merged with their county into one government, such as San Francisco, Denver, Philadelphia and Honolulu. There the city and the county cover the same area, and either name identifies the place.
New York City is five counties
Each of New York City's five boroughs is a county, and three of them have a county name that differs from the borough name:
| Borough | County |
|---|---|
| Manhattan | New York County |
| Brooklyn | Kings County |
| Queens | Queens County |
| The Bronx | Bronx County |
| Staten Island | Richmond County |
An address in Brooklyn is therefore in Kings County, a name that appears nowhere in the address. Postal city names add another layer: mail to Queens is addressed to neighbourhoods such as Flushing, Jamaica or Astoria rather than to "Queens" or "New York".
County names are not unique
County names repeat heavily. There are about thirty Washington Counties, and Jefferson, Franklin, Jackson and Lincoln each appear in around two dozen states. A county name is meaningful only together with its state, and even then the independent cities above produce pairs such as "Richmond" that need a type as well as a name.
This is the reason to avoid free-text county fields. "Jefferson" tells you nothing; "Jefferson County, Colorado" tells you something; a code tells you everything.
FIPS codes
The standard identifier for a county is its FIPS code: a two-digit state code followed by a three-digit county code, five digits in all.
| Code | Place |
|---|---|
06037 | Los Angeles County, California |
36061 | New York County, New York (Manhattan) |
48201 | Harris County, Texas |
22071 | Orleans Parish, Louisiana |
51760 | City of Richmond, Virginia |
11001 | District of Columbia |
Things worth knowing about them:
- They are strings. State codes run from
01for Alabama, so the codes for Alabama, Alaska, Arizona, Arkansas, California, Colorado and Connecticut all begin with zero. Stored as a number,06037becomes6037and no longer joins to anything. This is the same bug as the leading-zero ZIP code, and it has the same fix. - State codes skip some numbers. They are not a simple 1 to 50 sequence.
- County codes within a state are mostly odd numbers in alphabetical order, which left room to insert new ones. Virginia's independent cities are numbered from 510 upward, which is a convenient way to tell them from counties.
- They change, rarely. Counties are occasionally created, merged or renamed, and Connecticut's switch to planning regions replaced its county codes. Record the vintage of whatever reference table you load.
ZIP codes do not map cleanly to counties
A ZIP code is a set of delivery routes, and delivery routes ignore county lines. Many ZIP codes extend into two or more counties. A table that maps each ZIP to one county is choosing the county where most of the addresses are, and it will be wrong for the rest.
If the county matters, for tax in particular, derive it from the location of the address:
- Geocode the address to coordinates.
- Find which county boundary contains the point, using Census boundary files.
- Store the five-digit FIPS code, and the name for display.
A ZIP-based lookup is acceptable as a fallback or for rough statistics, and should be recorded as an estimate.
A data model that copes
CREATE TABLE counties (
fips CHAR(5) PRIMARY KEY, -- '51760'
state_code CHAR(2) NOT NULL, -- 'VA'
name VARCHAR(80) NOT NULL, -- 'Richmond'
kind VARCHAR(20) NOT NULL, -- 'county', 'parish', 'borough',
-- 'census area', 'independent city', 'municipio'
display VARCHAR(100) NOT NULL -- 'City of Richmond'
);
ALTER TABLE addresses
ADD COLUMN county_fips CHAR(5) REFERENCES counties (fips),
ADD COLUMN county_source VARCHAR(20); -- 'geocoded', 'zip_estimate', 'user'
The kind column lets the interface say "Orleans Parish" and "City of Richmond" correctly without string handling, and county_source records how far the value can be trusted.
Testing
County handling is tested with the places that break assumptions. A useful minimum set:
- an address in the City of Baltimore and one in Baltimore County;
- an address in a Virginia independent city;
- a Louisiana address, to check that the label says parish;
- an Alaska address outside any organised borough;
- a Brooklyn address, expecting Kings County;
- an Alabama or California address, to catch a FIPS code that has lost its leading zero.
The address generator attaches the county or county equivalent to each record and treats independent cities as their own jurisdictions, so a batch filtered to Virginia, Maryland, Missouri or Louisiana produces these cases without hand-writing them. For how county data relates to ZIP codes, see ZIP code architecture.