119 comments

[ 2.5 ms ] story [ 84.2 ms ] thread
I definitely agree in principle. But - without doxxing myself - I input my zip and the city is not correct. It’s a very close neighboring suburb (where the boundaries are definitely blurry) but it’s not the city on all the legal documents for my current house.
Ok but that only fetches the codes from the US, so now a non-US resident will start with their zip code and end up with random ass place on the other side of the globe. Now not only I still have to fill in the fields, but also clear them first.
So I typed my zip code and got Winsconsin, and couldn't change the country to Greece, which is what my zip code actually is for.

Proposing UX improvements is great, but please don't forget the other 95% of the planet.

It’s easy enough to say “put the zip first because that will tell you city, state and country in one input”.

What happens to customers not in the United States? They have no zip to enter. Or if they have a postal code of some stripe, it has a different format.

What about folks who are in Turkmenistan, that you’re grumpy about having to scroll past? How are they signing up?

Some zip codes cover multiple cities.
US-centric. I typed a Mexico postal code (it’s five digits) and got routed to somewhere in Maine. So - yeah the whole “I can tell you’re in the US just by the zip code” premise is entirely flawed.
The author complains about country selector drop-downs as part of the address flow, but if you're collecting zip codes you are already assuming United States. I don't think there's a country-inferer from completely generic postal code tool out there yet, is there?
Unfortunately you still need country first. But past that, the point stands well. You'll need to adjust the form based on the country, obviously.

For the US you can use zip-5 to prefill bunch of data and zip+4 practically fills it all out for a lot of addresses.

Each country has some particular nuance though, so it's only as simple as "zip first" or "postcode first" in some locations.

I completely agree with the premise, but if we just ask for the ZIP code first and auto-fill the rest, how am I going to justify my 2-week sprint to build a custom, React-based, fuzzy-searchable, virtualized dropdown component for the 'State' field?

Just kidding xP

I know some zips covers multiple cities. I would imagine some cross state lines in places too. Doesn’t cover multiple countries either as some have similar formats (5 digits). So there are edge cases that make this infeasible
I fail to see how you can claim this to work for sites which serve areas outside the United States, but have either no ZIP code, an overlapping code, or something else entirely. Germany has 5 digit PLZs, but putting some valid ones in doesn't get a result. It really seems like the author does not think about other countries.

I don't disagree with reordering the entry by relevance, but you have to start with country. That can also be a nice search - it will be a very short lookup, even if you put every country name in every language. Only after that is postal code (of whatever kind - it's only ZIP in the US) relevant.

As a side note, it's 2026, and there's still German software that thinks our postal codes are integers. Mine has a leading zero, and it hasn't been too long since I've seen (German-built!) software that silently truncates the 0 and then complains that it's just 4 digits and should be 5.
This happens in the US too, and even if you're wise enough to treat postal codes as strings (which they are) and not integers, someone is going to paste the data into Excel which will promptly blow things up on you anyway.
Head of data science at a corporation here. People pasting into Excel has been a bane of my job for over a decade.
Galaxy brain: address should just be a multi-line field
I entered my zip code… well, wrong country: I’m living in Germany.

And even if you knew that, the only thing you could have known from the zip code is the city. At least roughly, because multiple small villages share one zip code.

Or, to cut it short: This doesn’t work at all on a general and global level, so I guess there’s a reason why websites do this differently…

Related, on the country drop-down front: please put the United States (or whatever your customers' main country is) at the top. You can probably tell I want the US from a combination of, you know, 99% of your sales being to the US and my language being set to English. And, sure, put Canada and even the UK next to it. Go wild, have the top ten English-speaking countries there if you like! It makes things so much easier.

The trick, then, is that you don't remove anything from the alphabetical list. With modern computer technology, we can have two places to find something! So if I miss your fancy shortcut, or it's not applicable to me, everything will still be in the regular old familiar place. It just works.

> and my language being set to English

Absolutely not. Language should never have any merit at all on country selection.

As a Swede that prefers the English language for tech and internet stuff, sites that try to be smart about country selection based on browser language or language selection based on IP location can kindly go die in a fire. An extra hot fire if they don't even let you manually override the automatic "detection".

In the last couple of years in the uk, address forms ask for you street address and the rest will autocomplete from there - city, postcode. Makes things a lot easier in the way the author suggests
My zip covers two cities, each has a similar street name; 5-digits isn't enough.

I've encountered websites that take the zip and won't let me change the wrongly-assumed city

It doesn't take long to type your address. Plus password managers or keyboards often auto fill it. It's not that deep.
I guess a better proposal would be:

- Put the country first

- Put the zip code second

> From those 5 characters you can determine the city, the state, and the country

False. Many zip codes include more than one city, and some even cross multiple states. And you can't always tell the difference between codes from different countries. Now you're not just instantly filling the rest of the form, you're implementing fancy multi-country filtering logic, editable drop downs, etc. Given the obvious incompetence of the people implementing most web forms, you're asking for disaster here.

Instead, learn to use your browser's autofill feature, and design your sites with it in mind. If you do it right the user literally doesn't have to type a single character. That's even better than typing a numeric code. Sadly even this seems beyond the abilities of the people who implement web forms.

To this, I once moved to a city in a neighboring country and ended up having the exact same zip code as where I moved from.
Good point. France uses the same postal code layout as the United States. At one job where a data feed only had Zip for userlocation, we would look for suspiciously large numbers of people from Idaho because they have an overlap with the numbers used for Paris.
The kind of takes that promote the stereotypes of self-centered americans.
ZIP codes don't uniquely identify cities / towns. (Or, in fact, States). Not to mention, they certainly don't work globally...