Use the two-letter code in a postal State field
USPS Appendix B lists the abbreviations used for postal addressing. On a form, State may show the full name but require the corresponding two-letter value. Choose the entry matching the address rather than shortening a name yourself.
The lookup below covers the 50 states and the District of Columbia. DC is a separate federal district. USPS’s complete appendix also includes possessions and other postal destinations, so this list should not be used to reject every destination outside those 51 entries.
AL Alabama AK Alaska AZ Arizona AR Arkansas CA California CO Colorado CT Connecticut DE Delaware FL Florida GA Georgia HI Hawaii ID Idaho IL Illinois IN Indiana IA Iowa KS Kansas KY Kentucky LA Louisiana ME Maine 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 OH Ohio OK Oklahoma OR Oregon PA Pennsylvania RI Rhode Island SC South Carolina SD South Dakota TN Tennessee TX Texas UT Utah VT Vermont VA Virginia WA Washington WV West Virginia WI Wisconsin WY Wyoming DC District of Columbia
Check the second letter when names look similar
Alaska is AK and Arkansas is AR. Maine is ME, Maryland MD, Massachusetts MA, Michigan MI, Minnesota MN, Mississippi MS, Missouri MO and Montana MT. Guessing from the first two letters of the full name will fail for several entries.
Washington state uses WA, while Washington, DC uses DC. These codes describe different locations. Keep the state code attached to the city and ZIP of the same address instead of changing it to make a form accept an unrelated result.
State codes need their country context
In a US address, CA stands for California and DE for Delaware. A separate country control can use CA for Canada or DE for Germany. Store the country and state in separate fields so that one does not overwrite the other.
The USPS history page notes that Nebraska changed from NB to NE in 1969 to avoid confusion with New Brunswick in Canada. For a current US form use NE, and check official references when working with older data rather than guessing what an old abbreviation means.
Inspect the stored value after choosing a state
For a form you control, select a full state name and inspect the saved record or request payload. If your model expects OR but saves Oregon, decide explicitly how to map that value. Then reload the form and check that it displays the same selection.
Test an optional empty choice as well as a selected state. When changing the country, check that a US state is not retained under another country. Use the official USPS appendix if your application also handles territories or military postal destinations.
Keep a source sample intact through export
In the US generator, select a state and click Generate. Keep city, state and ZIP from the same result. Save it, open Saved addresses and use the country and region filters before exporting. In the exported record, state holds the code and stateName holds its name.
AddressSample currently covers the 50 states and DC using a limited source snapshot, with fictional profile details. Correct spelling and a valid two-letter code do not establish deliverability, residency or tax eligibility. Use the recipient’s confirmed address for an actual shipment.