Massachusetts county FIPS codes
Every Massachusetts county FIPS code with name, type, area, centre point and ZIP count, as CSV, Excel or JSON. Updated 19 November 2026.
Massachusetts counties and FIPS codes
Massachusetts has state FIPS code 25, and this list has 14 counties and county equivalents: 14 counties. Each full FIPS code joins the state code and a three-digit county code, so Barnstable County is 25001: 25 for Massachusetts and 001 for the county.
By area the largest is Worcester at about 4,111 km² (1,587 sq mi) and the smallest is Nantucket at about 154 km² (59 sq mi); the counties add up to about 21,163 km². Middlesex has the most ZIP codes assigned to it (111).
All 14 counties
| FIPS | Name | Type | Area km² | Latitude | Longitude | ZIP codes |
|---|---|---|---|---|---|---|
| 25001 | Barnstable County | County | 1,106 | 41.694639 | -70.469289 | 55 |
| 25003 | Berkshire County | County | 2,433 | 42.332798 | -73.233108 | 38 |
| 25005 | Bristol County | County | 1,475 | 41.914229 | -71.182416 | 44 |
| 25007 | Dukes County | County | 285 | 41.410636 | -70.637006 | 7 |
| 25009 | Essex County | County | 1,345 | 42.716343 | -70.963489 | 57 |
| 25011 | Franklin County | County | 1,891 | 42.576655 | -72.592054 | 30 |
| 25013 | Hampden County | County | 1,649 | 42.117354 | -72.589039 | 53 |
| 25015 | Hampshire County | County | 1,417 | 42.330111 | -72.764959 | 29 |
| 25017 | Middlesex County | County | 2,217 | 42.495566 | -71.350456 | 111 |
| 25019 | Nantucket County | County | 154 | 41.279689 | -70.008243 | 3 |
| 25021 | Norfolk County | County | 1,080 | 42.150649 | -71.242529 | 45 |
| 25023 | Plymouth County | County | 1,844 | 41.919372 | -70.835368 | 61 |
| 25025 | Suffolk County | County | 156 | 42.303867 | -71.087334 | 53 |
| 25027 | Worcester County | County | 4,111 | 42.345154 | -71.916835 | 99 |
No row matches. Clear the filter to see all.
File: massachusetts-county-fips-codes.csv
Using FIPS codes
FIPS codes are the join key for most US county data, from Census population tables to election results and BLS unemployment files. Store them as five-character text even though Massachusetts's codes start with 2: codes in states such as Alabama (01) and California (06) start with 0, and a number column drops that zero as soon as you combine states.
-- add county names to any table that has a 5-digit fips column
SELECT d.*, c.name AS county_name
FROM my_data d
LEFT JOIN county_fips c ON c.fips = d.fips
WHERE c.state = 'MA';In Excel, build the 5-digit code from two parts with =TEXT(A2,"00")&TEXT(B2,"000"), where A2 is the state code (25) and B2 the county code.
Where the data comes from
Names, types, areas and centre points come from Natural Earth's 1:10m admin-2 counties (version 5.1.1, public domain). We checked every FIPS code against the GeoNames admin-2 list: 14 of 14 match. ZIP counts come from the GeoNames postal code file on the Massachusetts ZIP code page.
Data dictionary
| Column | Type | Meaning |
|---|---|---|
| fips | text | Five-digit county FIPS code |
| state_fips | text | Two-digit state FIPS code |
| county_fips | text | Three-digit county code within the state |
| name | text | Short name |
| full_name | text | Name with its type, e.g. 'Kent County' |
| type | text | County, Parish, Borough, City, Census Area, Planning Region… |
| state | text | Two-letter state code |
| state_name | text | State name |
| area_sq_km | number | Area in km² (Natural Earth; rounded) |
| latitude | number | Centre point latitude (Natural Earth) |
| longitude | number | Centre point longitude (Natural Earth) |
| zip_codes | number | ZIP codes assigned to it in the GeoNames postal list |
| wikidata_id | text | Wikidata item, for linking to other data |