Skip to content

Instantly share code, notes, and snippets.

@mshafrir
Created May 9, 2012 17:05
Show Gist options
  • Save mshafrir/2646763 to your computer and use it in GitHub Desktop.
Save mshafrir/2646763 to your computer and use it in GitHub Desktop.
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
"DC": "District Of Columbia",
"FM": "Federated States Of Micronesia",
"FL": "Florida",
"GA": "Georgia",
"GU": "Guam",
"HI": "Hawaii",
"ID": "Idaho",
"IL": "Illinois",
"IN": "Indiana",
"IA": "Iowa",
"KS": "Kansas",
"KY": "Kentucky",
"LA": "Louisiana",
"ME": "Maine",
"MH": "Marshall Islands",
"MD": "Maryland",
"MA": "Massachusetts",
"MI": "Michigan",
"MN": "Minnesota",
"MS": "Mississippi",
"MO": "Missouri",
"MT": "Montana",
"NE": "Nebraska",
"NV": "Nevada",
"NH": "New Hampshire",
"NJ": "New Jersey",
"NM": "New Mexico",
"NY": "New York",
"NC": "North Carolina",
"ND": "North Dakota",
"MP": "Northern Mariana Islands",
"OH": "Ohio",
"OK": "Oklahoma",
"OR": "Oregon",
"PW": "Palau",
"PA": "Pennsylvania",
"PR": "Puerto Rico",
"RI": "Rhode Island",
"SC": "South Carolina",
"SD": "South Dakota",
"TN": "Tennessee",
"TX": "Texas",
"UT": "Utah",
"VT": "Vermont",
"VI": "Virgin Islands",
"VA": "Virginia",
"WA": "Washington",
"WV": "West Virginia",
"WI": "Wisconsin",
"WY": "Wyoming"
}
[
{
"name": "Alabama",
"abbreviation": "AL"
},
{
"name": "Alaska",
"abbreviation": "AK"
},
{
"name": "American Samoa",
"abbreviation": "AS"
},
{
"name": "Arizona",
"abbreviation": "AZ"
},
{
"name": "Arkansas",
"abbreviation": "AR"
},
{
"name": "California",
"abbreviation": "CA"
},
{
"name": "Colorado",
"abbreviation": "CO"
},
{
"name": "Connecticut",
"abbreviation": "CT"
},
{
"name": "Delaware",
"abbreviation": "DE"
},
{
"name": "District Of Columbia",
"abbreviation": "DC"
},
{
"name": "Federated States Of Micronesia",
"abbreviation": "FM"
},
{
"name": "Florida",
"abbreviation": "FL"
},
{
"name": "Georgia",
"abbreviation": "GA"
},
{
"name": "Guam",
"abbreviation": "GU"
},
{
"name": "Hawaii",
"abbreviation": "HI"
},
{
"name": "Idaho",
"abbreviation": "ID"
},
{
"name": "Illinois",
"abbreviation": "IL"
},
{
"name": "Indiana",
"abbreviation": "IN"
},
{
"name": "Iowa",
"abbreviation": "IA"
},
{
"name": "Kansas",
"abbreviation": "KS"
},
{
"name": "Kentucky",
"abbreviation": "KY"
},
{
"name": "Louisiana",
"abbreviation": "LA"
},
{
"name": "Maine",
"abbreviation": "ME"
},
{
"name": "Marshall Islands",
"abbreviation": "MH"
},
{
"name": "Maryland",
"abbreviation": "MD"
},
{
"name": "Massachusetts",
"abbreviation": "MA"
},
{
"name": "Michigan",
"abbreviation": "MI"
},
{
"name": "Minnesota",
"abbreviation": "MN"
},
{
"name": "Mississippi",
"abbreviation": "MS"
},
{
"name": "Missouri",
"abbreviation": "MO"
},
{
"name": "Montana",
"abbreviation": "MT"
},
{
"name": "Nebraska",
"abbreviation": "NE"
},
{
"name": "Nevada",
"abbreviation": "NV"
},
{
"name": "New Hampshire",
"abbreviation": "NH"
},
{
"name": "New Jersey",
"abbreviation": "NJ"
},
{
"name": "New Mexico",
"abbreviation": "NM"
},
{
"name": "New York",
"abbreviation": "NY"
},
{
"name": "North Carolina",
"abbreviation": "NC"
},
{
"name": "North Dakota",
"abbreviation": "ND"
},
{
"name": "Northern Mariana Islands",
"abbreviation": "MP"
},
{
"name": "Ohio",
"abbreviation": "OH"
},
{
"name": "Oklahoma",
"abbreviation": "OK"
},
{
"name": "Oregon",
"abbreviation": "OR"
},
{
"name": "Palau",
"abbreviation": "PW"
},
{
"name": "Pennsylvania",
"abbreviation": "PA"
},
{
"name": "Puerto Rico",
"abbreviation": "PR"
},
{
"name": "Rhode Island",
"abbreviation": "RI"
},
{
"name": "South Carolina",
"abbreviation": "SC"
},
{
"name": "South Dakota",
"abbreviation": "SD"
},
{
"name": "Tennessee",
"abbreviation": "TN"
},
{
"name": "Texas",
"abbreviation": "TX"
},
{
"name": "Utah",
"abbreviation": "UT"
},
{
"name": "Vermont",
"abbreviation": "VT"
},
{
"name": "Virgin Islands",
"abbreviation": "VI"
},
{
"name": "Virginia",
"abbreviation": "VA"
},
{
"name": "Washington",
"abbreviation": "WA"
},
{
"name": "West Virginia",
"abbreviation": "WV"
},
{
"name": "Wisconsin",
"abbreviation": "WI"
},
{
"name": "Wyoming",
"abbreviation": "WY"
}
]
@Blackjacx
Copy link

Is this somewhere existing for the whole world?!

@Emmanuelhd
Copy link

Is this somewhere existing for the whole world?!

Yes, here.

@nanasnumber
Copy link

Looking for exactly this! Thank you @mshafrir

@evild70
Copy link

evild70 commented Sep 14, 2023

All lowercase. Spaces replaced with dashes.

{
  "al": "alabama",
  "ak": "alaska",
  "as": "american-samoa",
  "az": "arizona",
  "ar": "arkansas",
  "ca": "california",
  "co": "colorado",
  "ct": "connecticut",
  "de": "delaware",
  "dc": "district-of-columbia",
  "fm": "federated-states-of-micronesia",
  "fl": "florida",
  "ga": "georgia",
  "gu": "guam",
  "hi": "hawaii",
  "id": "idaho",
  "il": "illinois",
  "in": "indiana",
  "ia": "iowa",
  "ks": "kansas",
  "ky": "kentucky",
  "la": "louisiana",
  "me": "maine",
  "mh": "marshall-islands",
  "md": "maryland",
  "ma": "massachusetts",
  "mi": "michigan",
  "mn": "minnesota",
  "ms": "mississippi",
  "mo": "missouri",
  "mt": "montana",
  "ne": "nebraska",
  "nv": "nevada",
  "nh": "new-hampshire",
  "nj": "new-jersey",
  "nm": "new-mexico",
  "ny": "new-york",
  "nc": "north-carolina",
  "nd": "north-dakota",
  "mp": "northern-mariana-islands",
  "oh": "ohio",
  "ok": "oklahoma",
  "or": "oregon",
  "pw": "palau",
  "pa": "pennsylvania",
  "pr": "puerto-rico",
  "ri": "rhode-island",
  "sc": "south-carolina",
  "sd": "south-dakota",
  "tn": "tennessee",
  "tx": "texas",
  "ut": "utah",
  "vt": "vermont",
  "vi": "virgin-islands",
  "va": "virginia",
  "wa": "washington",
  "wv": "west-virginia",
  "wi": "wisconsin",
  "wy": "wyoming"
}

@kilonzi
Copy link

kilonzi commented Oct 14, 2023

inspired by @WHITEH0ST to include full names for Django Choicefield: -

US_STATES = (
    ('Select one', 'Select one'), 
    ('AL', 'Alabama'),
    ('AK', 'Alaska'),
    ('AZ', 'Arizona'),
    ('AR', 'Arkansas'),
    ('AS', 'American Samoa'),
    ('CA', 'California'),
    ('CO', 'Colorado'),
    ('CT', 'Connecticut'),
    ('DE', 'Delaware'),
    ('DC', 'District Of Columbia'),
    ('FM', 'Federated States Of Micronesia'),
    ('FL', 'Florida'),
    ('GA', 'Georgia'),
    ('GU', 'Guam'),
    ('HI', 'Hawaii'),
    ('ID', 'Idaho'),
    ('IL', 'Illinois'),
    ('IN', 'Indiana'),
    ('IA', 'Iowa'),
    ('KS', 'Kansas'),
    ('KY', 'Kentucky'),
    ('LA', 'Louisiana'),
    ('ME', 'Maine'),
    ('MH', 'Marshall Islands'),
    ('MD', 'Maryland'),
    ('MA', 'Massachusetts'),
    ('MI', 'Michigan'),
    ('MN', 'Minnesota'),
    ('MS', 'Mississippi'),
    ('MO', 'Missouri'),
    ('MT', 'Montana'),
    ('NE', 'Nebraska'),
    ('NV', 'Nevada'),
    ('NH', 'New Hampshire'),
    ('NJ', 'New Jersey'),
    ('NM', 'New Mexico'),
    ('NY', 'New York'),
    ('NC', 'North Carolina'),
    ('ND', 'North Dakota'),
    ('MP', 'Northern Mariana Islands'),
    ('OH', 'Ohio'),
    ('OK', 'Oklahoma'),
    ('OR', 'Oregon'),
    ('PW', 'Palau'),
    ('PA', 'Pennsylvania'),
    ('PR', 'Puerto Rico'),
    ('RI', 'Rhode Island'),
    ('SC', 'South Carolina'),
    ('SD', 'South Dakota'),
    ('TN', 'Tennessee'),
    ('TX', 'Texas'),
    ('UT', 'Utah'),
    ('VT', 'Vermont'),
    ('VI', 'Virgin Islands'),
    ('VA', 'Virginia'),
    ('WA', 'Washington'),
    ('WV', 'West Virginia'),
    ('WI', 'Wisconsin'),
    ('WY', 'Wyoming')
)

@kuzmicheff
Copy link

Thank you very much for sharing!

@HamzaFa61
Copy link

Thank you for sharing! Do anyone have an idea where I can find the associated cities list?

@wesleyscholl
Copy link

label: "IL"

This one doesn’t match the rest of the data.

@Plazzko
Copy link

Plazzko commented Nov 7, 2024

Here is my list with timezones included. Let me know if it needs to be corrected.

@kevbost
Copy link

kevbost commented Nov 7, 2024

@Plazzko That is very thorough, thank you for sharing.

  • Would you mind pasting it directly here for easier access for the people of the future and SEO?

@Plazzko
Copy link

Plazzko commented Nov 11, 2024

@kevbost Sure 👍

[
  {
    "name": "Alabama",
    "abbreviation": "AL",
    "latitude": "32.31823140",
    "longitude": "-86.90229800",
    "timezones": ["CST (UTC-6)", "EST (UTC-5)"],
    "ianaTimezones": ["US/Central", "US/Eastern"]
  },
  {
    "name": "Alaska",
    "abbreviation": "AK",
    "latitude": "64.20084130",
    "longitude": "-149.49367330",
    "timezones": ["AKST (UTC-09)", "HST/HDT (UTC-10)"],
    "ianaTimezones": ["US/Alaska", "US/Aleutian"]
  },
  {
    "name": "Arizona",
    "abbreviation": "AZ",
    "latitude": "34.04892810",
    "longitude": "-111.09373110",
    "timezones": ["MST (UTC-07)", "MST/MDT (UTC-07)"],
    "ianaTimezones": ["US/Arizona", "US/Mountain"]
  },
  {
    "name": "Arkansas",
    "abbreviation": "AR",
    "latitude": "35.20105000",
    "longitude": "-91.83183340",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "California",
    "abbreviation": "CA",
    "latitude": "36.77826100",
    "longitude": "-119.41793240",
    "timezones": ["PST (UTC-8)"],
    "ianaTimezones": ["US/Pacific"]
  },
  {
    "name": "Colorado",
    "abbreviation": "CO",
    "latitude": "39.55005070",
    "longitude": "-105.78206740",
    "timezones": ["MST (UTC-07)"],
    "ianaTimezones": ["US/Mountain"]
  },
  {
    "name": "Connecticut",
    "abbreviation": "CT",
    "latitude": "41.60322070",
    "longitude": "-73.08774900",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Delaware",
    "abbreviation": "DE",
    "latitude": "38.91083250",
    "longitude": "-75.52766990",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Florida",
    "abbreviation": "FL",
    "latitude": "27.66482740",
    "longitude": "-81.51575350",
    "timezones": ["EST (UTC-5)", "CST (UTC-6)"],
    "ianaTimezones": ["US/Eastern", "US/Central"]
  },
  {
    "name": "Georgia",
    "abbreviation": "GA",
    "latitude": "32.16562210",
    "longitude": "-82.90007510",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Hawaii",
    "abbreviation": "HI",
    "latitude": "19.89676620",
    "longitude": "-155.58278180",
    "timezones": ["HAST (UTC-10)"],
    "ianaTimezones": ["US/Hawaii"]
  },
  {
    "name": "Idaho",
    "abbreviation": "ID",
    "latitude": "44.06820190",
    "longitude": "-114.74204080",
    "timezones": ["MST (UTC-07)", "PST (UTC-8)"],
    "ianaTimezones": ["US/Mountain", "US/Pacific"]
  },
  {
    "name": "Illinois",
    "abbreviation": "IL",
    "latitude": "40.63312490",
    "longitude": "-89.39852830",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Indiana",
    "abbreviation": "IN",
    "latitude": "40.26719410",
    "longitude": "-86.13490190",
    "timezones": ["EST (UTC-5)", "CST (UTC-6)"],
    "ianaTimezones": ["US/Eastern", "US/Central"]
  },
  {
    "name": "Iowa",
    "abbreviation": "IA",
    "latitude": "41.87800250",
    "longitude": "-93.09770200",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Kansas",
    "abbreviation": "KS",
    "latitude": "39.01190200",
    "longitude": "-98.48424650",
    "timezones": ["CST (UTC-6)", "MST (UTC-07)"],
    "ianaTimezones": ["US/Central", "US/Mountain"]
  },
  {
    "name": "Kentucky",
    "abbreviation": "KY",
    "latitude": "37.83933320",
    "longitude": "-84.27001790",
    "timezones": ["EST (UTC-5)", "CST (UTC-6)"],
    "ianaTimezones": ["US/Eastern", "US/Central"]
  },
  {
    "name": "Louisiana",
    "abbreviation": "LA",
    "latitude": "30.98429770",
    "longitude": "-91.96233270",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Maine",
    "abbreviation": "ME",
    "latitude": "45.25378300",
    "longitude": "-69.44546890",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Maryland",
    "abbreviation": "MD",
    "latitude": "39.04575490",
    "longitude": "-76.64127120",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Massachusetts",
    "abbreviation": "MA",
    "latitude": "42.40721070",
    "longitude": "-71.38243740",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Michigan",
    "abbreviation": "MI",
    "latitude": "44.31484430",
    "longitude": "-85.60236430",
    "timezones": ["EST (UTC-5)", "CST (UTC-6)"],
    "ianaTimezones": ["US/Eastern", "US/Central"]
  },
  {
    "name": "Minnesota",
    "abbreviation": "MN",
    "latitude": "46.72955300",
    "longitude": "-94.68589980",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Mississippi",
    "abbreviation": "MS",
    "latitude": "32.35466790",
    "longitude": "-89.39852830",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Missouri",
    "abbreviation": "MO",
    "latitude": "37.96425290",
    "longitude": "-91.83183340",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Montana",
    "abbreviation": "MT",
    "latitude": "46.87968220",
    "longitude": "-110.36256580",
    "timezones": ["MST (UTC-07)"],
    "ianaTimezones": ["US/Mountain"]
  },
  {
    "name": "Nebraska",
    "abbreviation": "NE",
    "latitude": "41.49253740",
    "longitude": "-99.90181310",
    "timezones": ["CST (UTC-6)", "MST (UTC-07)"],
    "ianaTimezones": ["US/Central", "US/Mountain"]
  },
  {
    "name": "Nevada",
    "abbreviation": "NV",
    "latitude": "38.80260970",
    "longitude": "-116.41938900",
    "timezones": ["PST (UTC-8)", "MST (UTC-07)"],
    "ianaTimezones": ["US/Pacific", "US/Mountain"]
  },
  {
    "name": "New Hampshire",
    "abbreviation": "NH",
    "latitude": "43.19385160",
    "longitude": "-71.57239530",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "New Jersey",
    "abbreviation": "NJ",
    "latitude": "40.05832380",
    "longitude": "-74.40566120",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "New Mexico",
    "abbreviation": "NM",
    "latitude": "34.51994020",
    "longitude": "-105.87009010",
    "timezones": ["MST (UTC-07)"],
    "ianaTimezones": ["US/Mountain"]
  },
  {
    "name": "New York",
    "abbreviation": "NY",
    "latitude": "40.71277530",
    "longitude": "-74.00597280",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "North Carolina",
    "abbreviation": "NC",
    "latitude": "35.75957310",
    "longitude": "-79.01929970",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "North Dakota",
    "abbreviation": "ND",
    "latitude": "47.55149260",
    "longitude": "-101.00201190",
    "timezones": ["CST (UTC-6)", "MST (UTC-07)"],
    "ianaTimezones": ["US/Central", "US/Mountain"]
  },
  {
    "name": "Ohio",
    "abbreviation": "OH",
    "latitude": "40.41728710",
    "longitude": "-82.90712300",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Oklahoma",
    "abbreviation": "OK",
    "latitude": "35.46756020",
    "longitude": "-97.51642760",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Oregon",
    "abbreviation": "OR",
    "latitude": "43.80413340",
    "longitude": "-120.55420120",
    "timezones": ["PST (UTC-8)", "MST (UTC-07)"],
    "ianaTimezones": ["US/Pacific", "US/Mountain"]
  },
  {
    "name": "Pennsylvania",
    "abbreviation": "PA",
    "latitude": "41.20332160",
    "longitude": "-77.19452470",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Rhode Island",
    "abbreviation": "RI",
    "latitude": "41.58009450",
    "longitude": "-71.47742910",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "South Carolina",
    "abbreviation": "SC",
    "latitude": "33.83608100",
    "longitude": "-81.16372450",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "South Dakota",
    "abbreviation": "SD",
    "latitude": "43.96951480",
    "longitude": "-99.90181310",
    "timezones": ["CST (UTC-6)", "MST (UTC-07)"],
    "ianaTimezones": ["US/Central", "US/Mountain"]
  },
  {
    "name": "Tennessee",
    "abbreviation": "TN",
    "latitude": "35.51749130",
    "longitude": "-86.58044730",
    "timezones": ["CST (UTC-6)", "EST (UTC-5)"],
    "ianaTimezones": ["US/Central", "US/Eastern"]
  },
  {
    "name": "Texas",
    "abbreviation": "TX",
    "latitude": "31.96859880",
    "longitude": "-99.90181310",
    "timezones": ["CST (UTC-6)", "MST (UTC-07)"],
    "ianaTimezones": ["US/Central", "US/Mountain"]
  },
  {
    "name": "Utah",
    "abbreviation": "UT",
    "latitude": "39.32098010",
    "longitude": "-111.09373110",
    "timezones": ["MST (UTC-07)"],
    "ianaTimezones": ["US/Mountain"]
  },
  {
    "name": "Vermont",
    "abbreviation": "VT",
    "latitude": "44.55880280",
    "longitude": "-72.57784150",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Virginia",
    "abbreviation": "VA",
    "latitude": "37.43157340",
    "longitude": "-78.65689420",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Washington",
    "abbreviation": "WA",
    "latitude": "47.75107410",
    "longitude": "-120.74013850",
    "timezones": ["PST (UTC-8)"],
    "ianaTimezones": ["US/Pacific"]
  },
  {
    "name": "West Virginia",
    "abbreviation": "WV",
    "latitude": "38.59762620",
    "longitude": "-80.45490260",
    "timezones": ["EST (UTC-5)"],
    "ianaTimezones": ["US/Eastern"]
  },
  {
    "name": "Wisconsin",
    "abbreviation": "WI",
    "latitude": "43.78443970",
    "longitude": "-88.78786780",
    "timezones": ["CST (UTC-6)"],
    "ianaTimezones": ["US/Central"]
  },
  {
    "name": "Wyoming",
    "abbreviation": "WY",
    "latitude": "43.07596780",
    "longitude": "-107.29028390",
    "timezones": ["MST (UTC-07)"],
    "ianaTimezones": ["US/Mountain"]
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment