Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Data Storage

Address Formatting for International Mailing? 84

linuxbaby asks: "Anyone have any advice or wisdom from experience about address formatting for international shipping? I'm starting to doubt the process of asking individual questions of 'name, company, address, city, state, postalcode, country' because of complaints or misunderstandings from places like Ireland (no postalcodes), Germany (postalcode goes before city), Japan and England (many lines of address info needed). Maybe the best approach is to just get the country as a option-select list of 2-character country codes, but leave the other lines wide open ('address1', 'address2', 'address3', 'address4') for the person to fill in as they see fit. The point here is not data mining, but shipping packages as accurately as possible, anywhere in the world. Thoughts?"
This discussion has been archived. No new comments can be posted.

Address Formatting for International Mailing?

Comments Filter:
  • wrong place to ask (Score:2, Insightful)

    by datazone ( 5048 )
    you need to speak with your shipping company.
    They do this for a living. They should be able to give you all the information you need.

    • Judging from your UID, I'm surprised you even posted that as it's so customary on SLashdot for people to ask thigns that they could find out in 5 mins starting with a phonebook.
  • Use a multiline input box and don't try to manually split it up into various fields. Let the user do that. Maybe stick with a dropdown box for Country is all.
    • but then they forget to add their country or postalcode and you can't ship the product. No the author is stuck in a hard place. He has to make sure that the address is good enough for a shipment to the country without pissing off the user forcing them to, say, enter there US state when they live Japan like so many forms are (well it's a lot better in the last 5 years I admit)
      • I'd hope a person wanting something shipped to them would know how to format an address to themselves, but what the author of this could do is link to a site thats shows/explains different ways to format an address. Wikipedia might be a good place to start, if it's not there, just start one and then people can throw stuff in, Like I'd mention canada post's postal code finder.
    • ...because of complaints or misunderstandings from places like Ireland (no postalcodes), Germany (postalcode goes before city), Japan and England (many lines of address info needed)...

      How about localized input pages? No one says you have to use the same input page for every country (and it's unlikely you send to more than a 6 or 8 that use different formats), you know that is is possible to tell where visitors come from. How you combine that data into one table is up to you, but shouldn't be a problem.

      • Saeed read my mind.
        I would do it slighlty diffently - instead of the input page being presented based on IP_based_guess, I would suggest A dropdown box for country to start with, and that takes them to a form based on that country.
        You can get the prefered format from each country's post office's website, eg - just search the site for something like "addressing guidelines".
  • by TRS-80 ( 15569 ) on Saturday March 19, 2005 @01:14PM (#11985099) Homepage Journal
    FRANK'S COMPULSIVE GUIDE TO POSTAL ADDRESSES [] is probably the best resource you're going to find on the topic - it covers every continent and most countries, with details on postcodes, street addresses and more. Very geeky, but also highly useful.
  • Freeform! (Score:4, Informative)

    by pv2b ( 231846 ) on Saturday March 19, 2005 @01:16PM (#11985110)
    There's nothing more annoying than forms that require you to enter your address in a specific way that doesn't fit for that particular company. If you're shipping to only one country, that's fine, but otherwise:

    What's wrong with just letting the user enter the address in a freeform text field? The user probably knows what his own address is, and can write it in a form that the local post office can deliver to. Just include a dropdown box for the country, and that should be all there's to it.
    • I'd second that.
      give them a free space to slap the address into.

      however, I suspect that companies like the postal code and other boxes as seperate.. and then requiring something valid seeming into each box because that way more people will actually fill out the REAL address.

      but for stuff that the user actually wants to provide a valid address for freeform should do nicely.
    • Zip codes, in countries that use them, are checksums. You need them in a separate field because you should check with the post office of that country to make sure it matches with the city. If the zip code and city/state do not match up you should make me verify the address. If the two match up odds are the address is good enough to get things to the right person.

      If you can get someone's mail to the right zip code the post office doesn't really need the rest of the address, just the name. (Though it

      • by Anonymous Coward

        If you can get someone's mail to the right zip code the post office doesn't really need the rest of the address, just the name. (Though it is much easier to deal with full addresses, so only try this when other options fail) This doesn't work so well if you name is common, but if you name is slightly obscure (which is most names, since obscure only means nobody else in town shares it) you are probably the only one in town with that name, and they can figure out where you live.

        You've never lived in rural A

        • Yeah, each town has a people who lived here before this was a town, and possibly still own half the place. They also have families that are amazingly fertile, where greatgranddad had 5 kids and now the ones with that name number in a hundreds and half the damn town has someone with that last name as their second cousin. Sometimes these are even the same family.

          OTOH, I know someone with a unique three letter first name, and he lives in a small town where everyone knows him. He has great fun telling people t

          • "amazingly fertile, where greatgranddad had 5 kids"

            That's not fertile at all. Haven't you ever met a Catholic family? My great-great-grandfather had 17 kids. One of my wife's friends has 10 kids, and another one has 8 at age 26. My granddad (and his wife too, sheesh! It takes two!) had 7. My great grandparents had 8.

            Now, a small family would be me. I'm already 30, and I only have a 4th on the way. But hey, the wife's good for another 20 years. I can surely get another 10, no problem.

            Protestants, athie

          • friend of mine has done the same thing, and his name isn't even all that unique.. but he works in a mail sorting facility at a university.. and he's probably the only one named that there.

            i've gotten mail for me that only had a city/postal code on it, no name.

            they used the return address to figure out who it was most likely to go to..a slight advantage of living in a rural area for almost 20 years and the post office people knowing who everyone is.
        • You'd be suprised what gets through.

          I once received a letter from an elderly relative in Ireland addressed to:

          <my name>
          <my town>
        • It still works though for your example. If everyone with the same last name is probably related, then you can probably just figure out a likely candidate and they'll pass it on to the correct person anyway.

          A few 'probablys' in that paragraph, but it's the postal service. what do you expect :)
    • I agree it is the best way, but are you certain everyone would write a complete address? I suspect a lot of them would forget the postcode, some others would forget the city, etc...
    • Freeform is all very well, until you have to use the address programatically.

      The classic example would be calculating accurate shipping costs, in that case typically you would want to know country, region, and maybe even city.

      In a freeform field, it wouldn't be possible to distinguish these.
  • google for prior art (Score:2, Informative)

    by hankaholic ( 32239 )
    Google is your friend. I found a good example quickly, about the fourth entry (one of the first three is the result of the submitter having asked this exact question on

    There's an example of what looks like a good solution used at g i/up

    They make some fields required (name and country would make sense) and others (such as state) are marked "required for some countries", with a big freeform text area marked "Mailing label" with the text "Int
  • by eyeball ( 17206 ) on Saturday March 19, 2005 @01:17PM (#11985120) Journal
    Try the Universal Postal Union [], specifically documents they have on properly addressing international addresses.

    Also, this looks interesting: International Address Standard UPU S42-1 []

    (BTW, I know nothing about this stuff, but I found it via Wikipedia, which these days is proving itself more useful than Google.)

  • Try a UPS Store if you have one near you. The have software that takes the guesswork out of shipping Internationally. Also, you're not necessarily limited to shipping with UPS. Some stores also ship DHL and FedEx.
  • by 200_success ( 623160 ) on Saturday March 19, 2005 @01:33PM (#11985212)

    You can get the addressing standard [] and the worldwide database [] from the Universal Postal Union.

  • ZIP codes (Score:2, Insightful)

    by Dark$ide ( 732508 )
    Here in the UK we have a mishmash of numbers and letters for our post codes. So whatever you do, don't try to validate it. RG21 7EJ WC1P 1AA E22 3NL EH22 3NL are all valid. There is nothing that pisses me off more than when an internet site tries to validate post code as 5digits or 5digits hyphen 4dgits. Give me a freeform text box, I'll give you my address in the form that MY post office will understand.
    • you can't even validate it as "2 groups of 3-4 alphanumeric"? it doesn't look very freeform to me.
      • Re:ZIP codes (Score:2, Informative)

        by welshie ( 796807 )
        UK Postcodes CAN be validated - without an address lookup database.

        There is a limited character set : Not all letters are valid in all positions (C, I, K, M, O, V, are not valid in the last two characters), the last three characters are ALWAYS in the form digit letter letter, a UK postcode ALWAYS begins with at least one letter, and ALWAYS contains at least two digits. The recommended layout is to put a space before the last three characters.

        [A-Z]{1,2}\d[A-Z\d]? \d[ABD-HJLNP-UW-Z]{2}

        Within the UK, m

        • The Netherlands postcode scheme is really much more clever. It includes check digit algorithms that will tell you if the building number should be odd, even, neither, either)

          So two houses next to each other (or facing each other) typically have a different postal code?
          • So two houses next to each other (or facing each other) typically have a different postal code?

            This is the case in the UK as well (although I don't think you would have to look up the computer to find out the side of the street)
            It is confused by some high volume customers having a dedicated box and postcode rather that share a code with their neighbours.
  • The Universal Postal Union [] has been around since 1874, ensuring that post can be mailed around the world without issue.

    The UPU has 190 member countries, and those countries submit mailing information to the UPU, making it the most extensive repository of postal information on earth.

    If you are looking for information on addresses [], I would start (and probably stop) with the UPU.
  • by DjReagan ( 143826 ) on Saturday March 19, 2005 @01:44PM (#11985305)
    Actually while it's customary to have many lines of address in England, all that is actually required is the house number, and the post-code. Everything else can be derived from those two. Having all the extra info just makes sure if you get the post-code wrong, it will still get to the destination.
    • You are absolutely correct - in theory.

      On the otherhand it rather overestimates the Royal Mail to actually work this way. I remember hearing about someone once who sent 50 or 60 letters addressed in this fashion. Something like 3 arrived! :o

    • A popular view of British postcodes, but not quite correct. Sad that I know this but do a "postcode lookup" DT10 1NA, with a house number of 1 and you'll find that there are 3 distinct properties.... Its this sort of thing that makes software almost work!
  • I ask them to send me an email with their name and address formatted exactly as is their custom.

  • I ordered a Firefox T-shirt from the Mozilla Store with international shipping to China. I filled out the shipping address in Chinese characters, but a few days later they sent me an email that said the address just showed up as a bunch of question marks in their software. Thankfully they agreed to let me email them the address as a gif image and they printed out the gif and stuck it on the package. I received the shipment about ten days later.

    If you provide the option of international shipping you should

    • China Post understands pinyin just fine, thankyouverymuch. Freakin' showoff.
      • You're probably correct if you're sending it to a part of China like Beijing where Mandarin is their first language, but where I live Mandarin is not most people's first language and the people that deliver the mail typically don't understand pinyin. China Post does employ people that read the pinyin and write in the characters next to it, but they usually do a pretty sloppy job and I frequently have problems with such mail being misdirected or delayed.

        I have a friend at a school here who frequently gets

  • by soliptic ( 665417 ) on Saturday March 19, 2005 @02:14PM (#11985459) Journal
    I work at an educational institution, as part of the student support team for some Distance Learning programmes. We have somewhere over 1000 students in somewhere over 90 countries.

    I think frankly your best bet here is to be freeform. They know best how their addresses are written. So long as the country goes last, to get the parcel from your country out to the appropriate country, the rest of the address should be written to their custom so that their postal service will be most likely to deliver it.

    I've seen all the things you describe - stuff like "90167 Bucharest" where the postcode precedes the city - and you're just not going to cope with all that if you try and enforce a complex system of validation.

    Our database just has Address1-Address5 (use as many or as few as you want), Postcode (this can be blank), Country (this can't be).

    When we tried entering a lot of addresses into the address book software of a certain well-known courier company, we ran into all sorts of problems. It would keep insisting on postcodes where they weren't appropriate, and so on. It's just more hassle than it's worth, and creates more problems (with literally not being able to enter what you know is correct) than it solves (stopping accidental bad data entry).

  • I can't wait until we just give our coordinates as an address.

    beam pkg via UPS to 42.3750 N, 71.1060 W -THX
    • beam pkg via UPS to 42.3750 N, 71.1060 W -THX

      Hmm, I suppose that would be a useful feature for a hospital* to have.

      *at least, that's what I see there when I look at the map... ;-)

      To try to keep this on-topic, I seem to remember something about a proposed system (I think I read about it here) to come up with a decent coordinat-based world-wide grid system for addresses. But I completely forget any details of it other than that it was supposed to be rather precise and short (I think two groups of three

    • I laugh at your pathetic degrees, minutes, and seconds! Real geeks use UTM. 12 N 413400 3698000
    • Amateur radio operators (among others) use Maidenhead Locator Squares [] for general location specification. You can add as many digits as necessary to get the desired precision. For HF work, it's sufficient for me to specify "FM17". For VHF work, I use FM17fr.

  • As someone that born/lives in Ireland its extremnely annoying when I order stuff on-line and even when I select Ireland I am still prompted to enter a postcode.
    This generally ends up being N/A or 12345, surely forms should forgo the postcode once Ireland is selected?

    The nearest thing Ireland has to a postcode is Dublin 4 or Dublin 1.
  • by Ankh ( 19084 ) * on Saturday March 19, 2005 @03:02PM (#11985722) Homepage
    I see this question as a special case of, how should I constrain data supplied by a user?

    Other good examples are telephone numbers (not all countries use ten digits, and sometimes you need to add a note like ask for extension 36914 or ask the receptionist to page me, I don't have a direct line), gender (it may surprise you to know that not everyone identifies as male or female, and not everyone is happy with saying which label they want to apply, so make it optional) and even country (is Taiwan a country? It depends who you ask).

    You need always to be aware that when a computer model of the external physical world disagrees with the external physical world, it's the model that's inaccurate or wrong, not the external physical world. This sounds pretty obvious, but look at the replies to this article and you'll see suggestions that might make me unable to give me my address.

    I've had Web forms ask for my Canadian postal code (by the way, spaces are significant in UK postal codes, and are not in Canadian ones), and then tell me (because they re-used some JacaScript) that a postal code must be five digits. When I tried 00000, the server-side software tried matching that to the billing address of my credit card. As a result I was unable to buy an airline ticket!

    In that case I used the 'phone. It took an hour on hold on an 800 number to place the order, because they had to process my credit card by hand, since their computer system didn't allow Canadian customers to fly from US destinations; I wonder how many millions of dollars they had lost before someone took the time to fight this? In the end I got a letter from support saying I should have used the Canadian and not the US Web page, and when I wrote back saying that's what I had done in fact, and please forward this to the programmers, I got a reply saying the bug was fixed.

    It's still pretty common to find Web sites whose programmers don't have the concept Some people live outside the US. let alone Some people live in the US but have foreign credit cards, as they are temporary residents.

    So when you use the billing address as a "checksum" against the credit card, and find they are different, the right thing to do is to ask the customer for confirmation and then believe the customer.

    Keep a record of the information, so that if they complain later you can work out where they asked things to be shipped, and maybe recover. Obviously, your goal is to deliver the package, so you want clear text that is written to be easily understood, not a legal disclaimer in all-caps that's there so you can slither out of the clutches of a disgruntled customer!

    The principles are
    early quality
    It's cheaper and more effective to get good data early on than to correct data later. Using input fields like house number, street name, postal region, county and so forth can help, as can parsing what they type, identifying the various parts, and asking the uer if they are correct.
    allow the user to insist
    If the user says their postal code is BEWARE OF THE DOG, the Post Office might not agree, but maybe it's the only way they can work out how to get an extra line of text onto the address label. It's probably better to let them do this than to lose them as a customer.
    Don't over-model
    If you are not going to need the individual address fields later, why are you making the customer type them in a form? Identify the mininum you know you'll need and ask yourself if it's really enough. Large forms aer intimidating, and people may be discouraged or complete them incorrectly because they are overwhelemed. Your database may only have twenty customers today, but when it has half a million addresses, consider the cost of storing an extra dozen fields per customer when you don't need them.
    The Real World is Right
    • Which you are discussion is very difficult to do using relational databases. The whole theory of associative databases is to allow data usually in a particular form but to allow for exceptions. Its an entirely different theory of datamodeling and needs to be introduced at the earliest stages of design.

      That's a lot to ask for a small percentage of the market. It may not be the case for most business that, "'better to let them do this than to lose them as a customer" it might just be better to lose them a
      • Thanks for the reply - you make a good point.

        The relational model is an approximation, of course, and where it doesn't quite fit, you have to decide whether to lose a few customers or to tweak your model.

        In the case of addresses, "use alternative address for this customer" is just fine for most purposes, especially if the final printed package will be checked by a human when the label is fastened, and fits within a relational database.


        • That BTW depends on how you do your shipping. Most people don't ship like the person who started this thread. They automated address correction software, automated customer tracking, for small packages they send the stuff to a presort house, use intellegent inserters... There may not be a human fastening the label at all.
          • True, I was trying to reply in the context of the original question. If you subcontract to a fulfillment house, for example, you may well have to supply fields provided by their Web service API or whatever. But if you design some flexibility into your system from the beginning, the extra customer service can help you grow, and even if you have to deal with a small percentage of orders by hand or weed them out and send them to a separate agent it might still be worth it, as long as you can do the filtering
    • by r00t ( 33219 )
      No, we will be checking that your billing address
      matches the shipping address. Sorry. Shipping to
      Romania or Nigeria is also a no-go.
      • Maybe you are shipping things that your country doesn't allow to be sent to those places, I don't know. I don't see anything wrong with sending things to Romania or Nigeria, as long as you get paid.

        If you require that my billing address match the shipping address, you had beeter not be in the gift business. I have many times sent people christmas or birthday presents that I ordered online. I paid, and the item was shipped elsewhere. Even Amazon manages this.

  • I work with Microsoft Axapta ( a /default.aspx) and the product has a bit more than just the standard address fields (although the approach could probably be expanded upon.

    One table keeps track of countries (3-Digit/2-Digit/2-Character ISO 3166 code, country name) along with a code for address format. I tend to set up a 1 address format per country even if multiple countries use the same format.

    The address format is displayed as a series of rows in a grid

  • probably what you've suggested yourself.

    (I'm happy to be of any help later too :-)

  • Foreign Characters (Score:2, Insightful)

    by packrat0x ( 798359 )
    What if it is easier (for the customer and local Post Office) to use foreign characters in the address label? If you are adding free form text fields, you might want to be prepared for Unicode support of various languages.

  • Thank god that someone recongnizes this . . . 6 months ago I bought a airkine ticket from Travelocity and had it shipped to Spain. . . They completely screwed up the address. They have a country field in their delivery address section, but they seem to have no clue what to do with the rest of the information.

    They got the region (state) wrong. Barcelona is not just a city, its also a region (equivalent to a state in Spain). Someone decided that it must be my city (It's not). They seem to have no way of han

    • Which, again, is one of the pleasures of ex-pat life in Singapore. See, Singapore is a city, state, region and country all rolled into one, and every building here has a unique postal code, so as long as I get my postal code right, I know my address can handle any mutilation by any shipping company.

      The downside, of course, is that postal codes, by extension, become traceable private information, so you'd have to start zealously guarding that as well.

    • I'm working outside the US at the moment, and my offical address is (in the local language) something along the lines of "In this district of this town, take the road to the Monistary, turn left when you see a sign saying such and such, and look for so and so; it's building #1."


  • [Company Name]
    [c/o] First & LastName
    StreetName Number[-Appartment/Suite]
    COUNTRYCODE PostalCode, City

    AFAIK the internationally accepted way of putting a country code in is as part of, ie preceding, the postalcode. I just append country for the casual reader, such as the postman.

    Which means my PC in Switzerland is:

    CH [pc], Zurich

    and my PC in The Netherlands is:

    NL [pc], Amsterdam
  • Free-form text entry box.

    The user knows how to write an address that will end up at their doorstep. You don't need to hold their hands (or step on them) with City, State, Zip, etc. fields.
  • How cooperative are the users? Are you just being nosy and forcing them to register for something so you can send them junk mail? Then you probably need to check everything and be annoying. But if they're paying money for something that they won't get if they screw up their address, then they are probably motivated to type the information correctly.

    Also, will a human being review the label before shipment anyway? Will you get a phone number or e-mail address so you can catch mistakes that slip through

"Hey Ivan, check your six." -- Sidewinder missile jacket patch, showing a Sidewinder driving up the tail of a Russian Su-27