Skip to content
Buy me a coffee
Web Resources

USA State List — HTML select snippet

List of US states, the District of Columbia and territories with USPS codes as an HTML select snippet, CSV, JSON, XML, SQL and plain text.

Live preview

Full list

About US state codes

USPS abbreviations and ISO 3166-2:US

The two-letter codes used for US states are the United States Postal Service (USPS) abbreviations, introduced in 1963 to fit addresses on the then new ZIP code envelopes. ISO adopted the same letters in ISO 3166-2:US, prefixing them with the country code (US-CA, US-NY). The traditional AP-style abbreviations (Calif., N.Y., Fla.) are only used in prose, never in forms or databases.

What the list contains

  • The 50 states.
  • The District of Columbia (DC), the federal district that is not a state but is treated like one in almost every address form.
  • Five inhabited territories with USPS codes and ZIP codes: American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Puerto Rico (PR) and the U.S. Virgin Islands (VI). Each also has its own ISO 3166-1 country code, which is what you should use for international shipping and locale tags (es-PR).
  • Three military "state" codes used for mail to armed forces addresses: AA (Armed Forces Americas), AE (Armed Forces Europe, the Middle East, Canada and Africa) and AP (Armed Forces Pacific). They go with the "city" values APO, FPO or DPO. Include them in shipping forms; drop them in forms about residence.

Tips

  • Some codes are easily confused: MI is Michigan (Mississippi is MS, Missouri MO, Minnesota MN, Montana MT); AK is Alaska (Arkansas is AR). Always validate against the list rather than trusting user input.
  • Store the code, display the name. Codes are stable, short and language-independent; names can be localized with CLDR subdivision data (Intl.DisplayNames with type: 'region' does not cover subdivisions yet, so you need your own translations).
  • ZIP codes do not map 1:1 to states in a few edge cases (a handful of ZIP codes cross state lines), so do not infer the state from the ZIP alone without a proper database.