Address Autocomplete vs Validation vs Geocoding: Three Different Jobs
Published November 15, 2026 by the USA Address Generator editorial team · Address Verification · 8 min read
Autocomplete suggests, validation confirms deliverability, geocoding finds coordinates. What each one really returns, where they disagree, and how to test code that depends on them.
Three kinds of service are sold under the general heading of "address verification", and they answer three different questions. Autocomplete answers "what is the user probably typing?". Validation answers "can mail be delivered here?". Geocoding answers "where on the map is this?". Using one to do another's job is behind a lot of failed deliveries and a lot of rejected customers.
Autocomplete: a typing aid
Autocomplete, or type-ahead, shows suggestions as the user types into the address field, and fills in the rest of the form when one is chosen.
What it gives you: fewer keystrokes, fewer typing mistakes and consistently structured fields.
What it does not give you: proof of anything. Suggestions come from an index of known places. Depending on the provider, that index may be built from map data rather than postal data, so it can suggest a building that receives no mail, and it can fail to suggest one that does.
Design rules that follow:
- Never make a suggestion mandatory. New construction, rural routes, PO Boxes, military addresses and unit numbers are frequently missing from suggestion indexes. If a customer cannot continue without selecting a suggestion, some customers cannot order at all.
- Let users edit after selecting. The most common edit is adding an apartment number, which many suggestion lists do not include.
- Do not record a selected suggestion as verified. The user chose from a list. Nothing was checked.
Validation: can mail be delivered
Address validation compares an address with the Postal Service's own delivery data and returns a standardised version plus a set of result codes. In the United States, software that does this is certified by USPS under a programme called CASS, and the delivery-point check is called DPV, for Delivery Point Validation.
What a validation response normally contains:
- The standardised address: abbreviations applied, the ZIP+4 added, city name corrected to the postal city.
- A delivery point result, which is the most useful part and is more than a yes or no:
| DPV result | Meaning | What to do |
|---|---|---|
| Y | Confirmed. The address, including any unit, is a known delivery point. | Accept. |
| S | The building is confirmed but the unit given was not recognised. | Ask the user to check the apartment or suite number. |
| D | The building is confirmed and it has units, but none was given. | Ask for the apartment or suite number. |
| N | Not confirmed as a delivery point. | Ask the user to check the address; allow them to proceed if they insist. |
- Other indicators, such as whether the address is residential or commercial, whether it is currently vacant, and whether it is a commercial mail receiving agency.
Important behaviour to design for:
- An unconfirmed result is not proof that the address is wrong. Postal data lags behind new construction, and some places receive mail only at a PO Box. Treat it as a prompt to the user, not a rejection.
- The service may change what the user typed. It can correct a misspelt street, replace the city with the postal city, or change the ZIP. Show the corrected address and ask the user to confirm it, and keep the original.
- Validation is about mail. A confirmed delivery point says nothing about who lives there and does not prove that the customer is entitled to use the address.
Geocoding: where it is
Geocoding turns an address into latitude and longitude. It is what you need for maps, distance calculations, delivery zones, store finders and tax jurisdictions that depend on location.
Every geocoding result has an accuracy level, and the level matters more than the coordinates:
| Level | What the point represents |
|---|---|
| Rooftop or parcel | The building or the lot itself. |
| Interpolated | An estimate along the street segment, worked out from the range of house numbers on that block. |
| Street | The middle of the street. |
| Postal code or city | The centre of a ZIP area or a town. Often kilometres from the address. |
A geocoder almost always returns something. Given an address it cannot find, many return the centre of the ZIP code or the city with a low accuracy level instead of an error. Code that ignores the accuracy field will place those customers at the same wrong point and compute delivery fees and tax from it.
Two further limits. A geocoder can locate a building that receives no mail, so a rooftop match is not evidence of deliverability. And some valid postal addresses have no meaningful location at all: PO Boxes, General Delivery and military addresses.
How they disagree
| Situation | Autocomplete | Validation | Geocoding |
|---|---|---|---|
| Newly built house | Often missing | Often not yet confirmed | May interpolate along the street |
| Apartment number omitted | Usually not noticed | Flags a missing unit | Unaffected |
| PO Box | Often missing | Confirmed | No real location |
| Rural route box | Often missing | Confirmed | Poor or none |
| Building that receives no mail | May be suggested | Not confirmed | Rooftop match |
| Synthetic test address | Not suggested | Not confirmed | ZIP or street-level guess |
No single result is "the truth". Decide which question your feature is asking and call the service that answers it.
Which one you need
- A sign-up form that asks for an address: autocomplete for convenience, with format checks. Validation only if you will send mail.
- Checkout with shipping: validation, with the DPV result deciding whether to prompt the customer.
- Delivery zones, store locators, distance pricing: geocoding, with a minimum accuracy level.
- Location-based tax: geocoding at rooftop accuracy, or a service built for tax jurisdictions.
- Fraud screening: validation indicators are one input among several, never a decision on their own.
Testing code that depends on these services
Synthetic addresses, including everything produced by this site, are invented. They are built from a real city, state and ZIP with a made-up street and house number, so a validation service will normally return "not confirmed" for them and a geocoder will return a low-accuracy guess. That is not a defect. It makes them the right input for one half of your tests and the wrong input for the other.
Use synthetic addresses for:
- form layout, field lengths and formatting;
- storage, export and display;
- the "not confirmed" path: the warning, the "use this address anyway" choice, the retry;
- low-accuracy geocoding results and the fallbacks they should trigger.
Do not use them for the confirmed path. For that, use the test addresses your provider documents for the purpose, or mock the provider's response. Mocking is usually the better option in automated tests, because it is free, fast and deterministic:
const responses = {
confirmed: { dpv: 'Y', standardised: { line1: '500 OAK ST APT 2', zip: '03301-4321' } },
missingUnit: { dpv: 'D', standardised: { line1: '500 OAK ST', zip: '03301-4321' } },
unknownUnit: { dpv: 'S', standardised: { line1: '500 OAK ST APT 99', zip: '03301-4321' } },
notFound: { dpv: 'N', standardised: null },
};
test.each(Object.entries(responses))('checkout handles %s', async (name, response) => {
verifier.mockResolvedValue(response);
const result = await submitAddress(sampleAddress);
expect(result.nextStep).toMatchSnapshot();
});
One test for each result code, plus a timeout and an error from the provider, covers the behaviour customers will actually meet. The address generator supplies the sample input, and the address format validator shows the shape checks worth doing before any paid call is made. For the difference between standardising an address and verifying it, see the standardisation guide.