The technical name for what are commonly referred to as SWIFT codes, is Banking Identification Codes (BICs). They are unique across the world, with SWIFT being the issuing body responsible for allocating new BICs. One financial organisation, usually a bank but not always (they could be a brokerage firm or a clearing house for example), will have a number of BICs.
These different BICs may be for different services, and, separate BICs are used for test and live, as a precaution against accidentally publishing test feeds into production. The BICs themselves are upper case alphanumeric, up to 10 characters (in some cases 7 are used, padding with XXX to the right). There is not a consistent representation of the organisation name and location within the BIC (sorry madalingsabihin). It is up to the organisation to agree with SWIFT what codes to use. The lead 3 or 4 characters usually indicate the name of the financial insitution, though this might reflect an old name the party was formerly trading as (e.g. HSBC have BICs beginning MID for Midland Bank). SWIFT publish a directory of BICs.
So who are SWIFT anyway?
In 1973, banks still communicated via telex — not very secure, minimum standards and not automated either. Imagine receiving 10,000 telexes a day. So, 239 banks from 15 countries formed a cooperative to "automate the telex". They called it the Society for Worldwide Interbank Financial Telecommunication (no "s" at the end). S.W.I.F.T.
SWIFT are one of the prime network providers for movement of cash between banks, and for many other types of transaction. SWIFT provide a financial EDI infrastructure, offering Electronic Funds Transfer (EFT) and Electronic Trade Confirmation (ETC), allowing the banks and other parties involved, the message partners, to have Straight Through Processing (STP). The idea is to substantially reduce the time taken to process a transaction from a few days (as is only possible conducting the transaction manually), to within a day.
SWIFT have defined a number of message types, designated MTnnn, together with validation rules. A SWIFT message contains a sequence of fields as lines of text - which could also be referred to as SWIFT codes. To give you the flavour of a SWIFT message, here is an example MT360 interest rate swap. Note that this is not an actual live trade.
Note that the 57A, 82A and 87A fields are BICs of the counterparties.
This is a node your day job node.