How does address validation work?
Address validation checks an address in layers: first the format, then whether the ZIP code belongs to the state, then whether the city matches the ZIP, and finally whether the area code belongs to the state. A good validator reports exactly which layer failed, instead of a generic “invalid address” message.
Layer 1: format
Is the ZIP five digits, is the state a two-letter code, is there a street, a city and a state? Format checks catch typos fast, but they cannot tell whether the address is internally consistent.
Layer 2: ZIP and state
Each state has a ZIP range — California is 900–961, New York is 100–149. A ZIP outside the state's range fails immediately, even if the format looks right.
Layer 3: city and ZIP, and area code
The strongest check is city-to-ZIP: Los Angeles uses 90012, San Francisco uses 94103, so Los Angeles with 94103 must fail. The area code is checked the same way — 213 belongs to Los Angeles, 415 to San Francisco.
Frequently asked questions
Can validation prove an address is real?
No. Validation only proves the parts are consistent with each other. Test addresses pass validation and still belong to nobody — that is the point of test data.
Why did my address fail validation?
Check the layers in order: a typo in the ZIP, a ZIP from another state, a city that does not match the ZIP, or an area code from another city.
Should I validate on the client or the server?
Both. Client-side validation gives instant feedback, and server-side validation is the real gate — never trust the browser alone.
Test data — not a real person. All addresses on this page are test data for software testing only. No address belongs to a real person; no SSN is generated; phone numbers use the 555-0100–555-0199 test range and emails use example.com.