Published Saturday 22 November 2014
Categories: General |

Share this Share on Facebook Share on Twitter Share on Google Plus
Post View Counter 201

Postal Address Parser

On our ecommerce shop we needed to be able to format customer addresses in the correct format and layout for the destination countries, to do this I have written a simple C# postal address parser to format the input address in international formats for postal labels.

I have included 3 different formatting modes into the class but it is simple to add extra formats and countries if needed.


ParseAddress(string CustomerName, string Organisation, string address1, string address2, string address3, string address4, string address5, string town, string county, string postcode, string country, bool returnhtml)

Returns a string containing the formatted address

The C# class can be downloaded from