US Address Test Data Generator
Generate fictional US addresses and phone numbers for form tests. Compare five-digit ZIPs, ZIP+4 and deliberately short ZIPs in JSON or CSV.
Which ZIP formats does your form accept?
Use the first Manchester record for all three cases. The street and phone stay the same, so a change in the result can be traced to the ZIP field.
| ZIP submitted | What to check |
|---|---|
| 03101 | A five-digit ZIP. Save the record, reopen it and check that the leading zero survives. |
| 03101-0001 | If your form accepts ZIP+4, check that it keeps the hyphen and all four suffix digits. |
| 3101 | A deliberately short ZIP. Check that the form flags the field and keeps the other entries for correction. |
Follow one address from JSON to CSV
To reproduce the JSON below, click Example, choose five digits and set the row count to 1. The quotes around "03101" preserve the leading zero.
CSV carries the same characters but does not declare column types. Import the zip column as text, then export the row again. If the exported value is 3101, compare it with the original JSON to locate where the zero disappeared.
[
{
"street": "100 Example Fixture Lane",
"city": "Manchester",
"state": "NH",
"zip": "03101",
"phone": "603-555-0100"
}
]
Test phone formatting with two area codes
Manchester records pair NH and 03101 with the 603 area code. Portland records pair OR and 97204 with 503. Use one of each to check that switching cities updates the state, ZIP and phone together.
The first phone numbers are 603-555-0100 and 503-555-0100. They work as inputs for display and formatting tests. The 555-0100 through 555-0199 block is reserved for fictional numbers, so use a separate test service for SMS delivery.
Reproduce a batch-import bug
Start with two Manchester ZIP+4 records. The suffixes are 0001 and 0002. If an importer copies the first ZIP into both rows, comparing just these two records exposes the error.
With 100 rows, the last ZIP is 03101-0100. Click Generate again for a different batch of streets. Change the format and click Generate to export the current batch. Example restores the fixed sample.
Questions & answers
Can I recover a four-digit ZIP by adding a zero?
For Manchester, adding a zero turns 3101 back into 03101. For Portland, the short sample is 7204 and the original is 97204. A four-digit value alone does not tell you which digit was lost. Check the original address before correcting it.
Can I use these addresses for delivery or Wi-Fi Calling?
The street and ZIP+4 suffix are fictional. Use a confirmed delivery address for mail and your actual location for E911 registration.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Generate both city profiles in all three ZIP modes. Parse a 100-row CSV and compare every field with the JSON output, including the first and last reserved phone numbers. Generate consecutive batches of 100 and compare their street sets, ZIPs, phone numbers and CSV fields.
- Comparison reference
- Fixed examples use the ZIP formats in USPS’s ZIP Code™ - The Basics and the fictional numbers in NANPA’s 555 Line Numbers. A four-digit ZIP is the negative control.
- Verification scope
- Checks cover formatting and serialization for two cities. Street deliverability, assigned ZIP+4 suffixes and E911 database matches are outside their scope.
Test source and cases (select a file to read it)
-
us-address-fixtures.test.js
- US address fixtures preserve ZIP strings and generate a four-digit rejection case
- US address fixtures retain every ZIP and reserved phone across JSON and CSV
- US address fixtures reject unsupported cities, modes and batch sizes
- US address fixtures switch every street on regeneration and retain the selected batch in CSV
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.