- Address Line 1 = house number + street name (e.g., "123 Main St"). Address Line 2 = apartment, suite, or unit only (e.g., "Apt 4B") β never repeat the city there.
- Pick the state from the dropdown using its two-letter USPS code (CA, TX, NY); never type the full name into a 2-character field.
- ZIP is 5 digits; ZIP+4 works too, but a hyphen-less 9-digit string ("941021234") is rejected by most forms.
- City, state, and ZIP must be a matched set β mixing a Los Angeles ZIP with a San Francisco city name fails validation on most checkout systems.
You are at checkout, the shipping form has seven fields, and the moment you hit "Continue" it throws back a red error: "Please enter a valid address." If you live outside the US β or you are a developer testing an American storefront β this is a familiar frustration. The form is not broken; it is checking your input against USPS delivery rules that are never explained on the page. This guide walks through every field on a typical US address form, then shows four complete, worked examples you can copy as templates.
1. Anatomy of a US Address Form
Nearly every US shipping, billing, or registration form asks for the same seven pieces of information, in this order:
The two fields that cause the most trouble are Address Line 1 / Line 2 and the State dropdown, so let's take them one at a time.
2. Field-by-Field Walkthrough
Full Name
First and last name in Western order. For business deliveries, many forms accept the company name here, or provide a separate "Company" field β if a company field exists, use it and keep your personal name in the name field so the carrier knows who receives the package.
Address Line 1 β the delivery point
This is the single most important field. It must contain the house or building number first, then the street name and suffix:
- β 123 Main St β number, name, suffix, in that order
- β 1600 Amphitheatre Pkwy β "Pkwy" (Parkway) is a valid USPS suffix
- β Main St 123 β number after the street is the European order; US parsers will flag it
- β 123 Main β missing suffix; many validators auto-complete it, but some reject it outright
Address Line 2 β secondary unit only
Line 2 is not a continuation of Line 1 and it is definitely not for your city or country. It exists for exactly one thing: the unit designator inside the building.
- Apt 4B β apartment
- Suite 300 β office suite
- Unit 12 β condo or commercial unit
- Fl 2 β floor (less common, accepted)
City
Type the official city name as USPS recognizes it β which is not always the name locals use. "NYC" and "San Fran" are rejected by strict validators; use New York and San Francisco. Some suburbs share a ZIP with the parent city; when in doubt, the city returned by the USPS ZIP lookup tool is the safe choice.
State β always the two-letter code
On web forms this is almost always a dropdown of the 50 states plus DC and territories. Select by the two-letter USPS abbreviation (CA, TX, NY). If you are testing a raw text field instead of a dropdown, use the abbreviation too β "California" or "Calif." in a 2-character field fails instantly.
ZIP Code
Five digits (94102) is the safe universal input. The extended ZIP+4 form (94102-1234) is also accepted by most forms and improves delivery precision. The one format that consistently fails is nine digits without the hyphen (941021234) β avoid it unless the form explicitly says "9 digits, no dash".
Phone
Optional on most forms, but carriers use it for delivery issues. The safest format is the national 10-digit pattern (415) 555-0132; for international forms that accept it, prefix the country code as +1 415 555 0132.
3. Four Worked Examples You Can Copy
Bookmark these four patterns β they cover over 95% of real US addresses you will ever need to write.
Example A β Apartment (most common)
Emily Johnson
2450 Mission Street, Apt 12
San Francisco, CA 94110
United States
On a two-line form: Line 1 = "2450 Mission Street", Line 2 = "Apt 12".
Example B β Business / office suite
TechCorp Inc.
789 Innovation Drive, Suite 300
Austin, TX 78701
United States
If the form has a separate "Company" field, put "TechCorp Inc." there and the recipient's own name in the name field.
Example C β PO Box
Michael Chen
PO Box 4567
Portland, OR 97208
United States
A PO Box address has no street line at all β "PO Box 4567" goes into Address Line 1 and Line 2 stays empty. One critical caveat: UPS and FedEx cannot deliver to PO Boxes. If a store ships exclusively via those carriers, the form may reject PO Box addresses by design, and you will need a street address instead.
Example D β Rural route
Sarah Miller
14200 County Road 38
Platteville, CO 80651
United States
Rural addresses use county roads, state routes, or highway numbers instead of named streets. The same rules apply: number first, then the road designator, and no apartment line unless there is a unit.
4. Why Forms Reject Addresses β and the Fix
| Rejection reason | What the form checks | Fix |
|---|---|---|
| City / state / ZIP mismatch | ZIP prefix must match the state; city must exist inside the ZIP | Copy all three from one verified source as a set |
| State written in full | Field length is exactly 2 characters | Use the USPS code (CA, not "California") |
| Missing street suffix | Delivery point must end in St / Ave / Rd / β¦ | Add the suffix: "456 Oak" β "456 Oak Ave" |
| Unit number on the wrong line | Line 2 parsed as unit-only | Keep "Apt 4B" on Line 2, street on Line 1 |
| 9-digit ZIP without hyphen | Regex ^\d{5}(-\d{4})?$ | Write "94102-1234", not "941021234" |
| PO Box with UPS/FedEx-only shipping | Carrier restriction, not a format error | Use a street address for that store |
5. Testing Address Forms Without Real Data
Everything above applies equally if you are on the other side of the form β building or QA-testing one. The fastest way to exercise every field is to feed the form complete, format-correct addresses that are guaranteed consistent: city, state, and ZIP drawn from the same record, suffix always present, unit numbers on Line 2 where they belong. Our random address generator produces exactly that kind of matched data for the US (and five other countries), so a single click gives you a full form-filling set without touching anyone's real information.
For a deeper look at the underlying rules β street suffixes, the full state abbreviation table, and ZIP code structure β see our US Address Format Guide, and for how validation systems decide whether an address "exists", read What Is a Valid US Address Format?.
6. Lessons from Filling Hundreds of These Forms
After filling US address forms across dozens of storefronts and test environments, three habits eliminated nearly all rejections for me. First, I stopped typing addresses freehand: I keep four template addresses (one per pattern in Section 3) and adapt the numbers, which removes typos in suffixes and state codes entirely. Second, whenever a form rejects an address that looks perfect, I check the ZIP against the city before touching anything else β mismatched triples are responsible for the overwhelming majority of "invalid address" errors, far more than any formatting detail. Third, I never rely on Line 2 being rendered: on single-line forms I fold the unit into Line 1, because a unit that ends up below the city line is the classic cause of "address truncated" delivery failures.
One more observation that surprises people: the strictness of validation varies wildly by platform. Large marketplaces run full USPS CASS-certified checks and will reject a technically-deliverable address over a missing suffix, while a small shop's form may accept "Main St 123" without complaint. If you are building a form yourself, validating the city/state/ZIP triple plus the presence of a house number catches the errors that actually break delivery, without punishing users for harmless style differences.