DataBrighten

    Massachusetts county FIPS codes

    14counties · state FIPS 25

    Every Massachusetts county FIPS code with name, type, area, centre point and ZIP count, as CSV, Excel or JSON. Updated 19 November 2026.

    textnumberdateyes/no
    State FIPS25Massachusetts
    Counties14counties
    LargestWorcester4,111 km²
    LicencePublic domainNatural Earth

    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

    FIPSNameTypeArea km²LatitudeLongitudeZIP codes
    25001Barnstable CountyCounty1,10641.694639-70.46928955
    25003Berkshire CountyCounty2,43342.332798-73.23310838
    25005Bristol CountyCounty1,47541.914229-71.18241644
    25007Dukes CountyCounty28541.410636-70.6370067
    25009Essex CountyCounty1,34542.716343-70.96348957
    25011Franklin CountyCounty1,89142.576655-72.59205430
    25013Hampden CountyCounty1,64942.117354-72.58903953
    25015Hampshire CountyCounty1,41742.330111-72.76495929
    25017Middlesex CountyCounty2,21742.495566-71.350456111
    25019Nantucket CountyCounty15441.279689-70.0082433
    25021Norfolk CountyCounty1,08042.150649-71.24252945
    25023Plymouth CountyCounty1,84441.919372-70.83536861
    25025Suffolk CountyCounty15642.303867-71.08733453
    25027Worcester CountyCounty4,11142.345154-71.91683599

    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

    ColumnTypeMeaning
    fipstextFive-digit county FIPS code
    state_fipstextTwo-digit state FIPS code
    county_fipstextThree-digit county code within the state
    nametextShort name
    full_nametextName with its type, e.g. 'Kent County'
    typetextCounty, Parish, Borough, City, Census Area, Planning Region…
    statetextTwo-letter state code
    state_nametextState name
    area_sq_kmnumberArea in km² (Natural Earth; rounded)
    latitudenumberCentre point latitude (Natural Earth)
    longitudenumberCentre point longitude (Natural Earth)
    zip_codesnumberZIP codes assigned to it in the GeoNames postal list
    wikidata_idtextWikidata item, for linking to other data