Ever wondered how financial institutions exchange cash from account to account or even from country to country? The key is the use of specialized codes -- SWIFT codes and routing numbers -- that tell the financial system where and how to send money.

Hand writing on a blank check.
Image source: Getty Images.

SWIFT codes

The international system -- SWIFT codes

For transferring money internationally, financial institutions and corporations rely on a system managed by the Society for Worldwide Interbank Financial Telecommunications -- SWIFT.

SWIFT is a member-owned cooperative of 11,000 banks and companies from over 200 countries worldwide. The SWIFT network primarily facilitates the transfer of payments, securities, and Treasuries between said parties the world over.

SWIFT codes are a string of eight to 11 alphanumeric identifiers that tell the system how to handle each transfer. Think of the identifiers as the digital address of each institution. The SWIFT system uses the codes to know where the transfer is coming from, where it's going, and how it's going to get there.

The code is constructed using a bank or institution code, a country code, a location code, and a branch code. Together, this is a comprehensive construct that effectively identifies every institution on the network, anywhere in the world.

Routing numbers

The domestic U.S. system -- routing numbers

In function, the routing number system used by U.S. financial institutions is very similar to the international SWIFT system. The biggest difference is that routing numbers are used for transfers domestically instead of the internationally used SWIFT code.

Each nine-digit routing number consists of two different codes and a check digit. The first four digits are the routing code the Federal Reserve banks use to direct each transfer correctly through their system, and the second is the bank identifier used to notate the financial institution associated with the payment. The check digit is used to ensure that checks are correctly input into a system.

Americans most commonly know the routing numbers as the code printed on the bottom of paper checks, but it's also used for wire transfers, payments via the automated clearinghouse system, and direct deposits.

Related investing topics

SWIFT or routing number?

SWIFT or routing number?

The most significant difference between SWIFT codes and routing numbers is whether a given payment is crossing international borders. If your payment is staying domestic, then the routing number will be used and, if the payment is going abroad, the SWIFT code will take the lead.

In both cases, the code is a critical tool to ensure that the money transfer moves from one place to the other quickly, efficiently, and accurately every time.

The Motley Fool has a disclosure policy.