A sorting code is a six-digit number that identifies which bank branch holds your account
A sorting code is a six-digit number used in the United Kingdom and Ireland to route money to the correct bank and the correct branch within that bank. When you send money to someone else's account, you need three pieces of information: their name, their account number, and their sorting code. The sorting code tells the payment system which of thousands of bank branches the money should go to.
The number is written as three pairs of digits separated by hyphens — for example, 20-17-80. Each pair has a specific meaning. The first two digits identify the bank itself (Barclays, HSBC, Lloyds, and so on). The second pair identifies the region or processing centre. The third pair identifies the individual branch where the account is held.
You will see sorting codes on cheques, in your online banking, and on statements. If you are sending money within the UK or Ireland, you cannot complete the transfer without it. International transfers use a different system called a SWIFT code or IBAN, which serves a similar purpose but works across borders.
Key Takeaways
- A sorting code is a six-digit number that identifies your bank branch and is required for any domestic payment in the UK or Ireland.
- The first two digits name the bank, the second pair identify the region, and the third pair identify your specific branch.
- You can find your sorting code on a cheque, in your online banking portal, or by calling your bank.
- Sorting codes are only used for payments within the UK and Ireland; international transfers use SWIFT codes or IBANs instead.
- A wrong sorting code will send money to the wrong branch, which delays the payment and may require the receiving bank to return it.
Where to find your sorting code
The easiest place to find your sorting code is on a cheque. Look at the bottom left of the cheque — you will see nine digits in total. The first six digits are your sorting code. If you do not have a cheque book, log into your online banking and look for account details or payment information. Most banks display the sorting code next to your account number.
You can also call your bank's customer service line and ask them to read it to you. They will ask you to verify your identity first. Some banks print the sorting code on statements, though not all do. If you know your bank's name and the town or city where your branch is located, you can search for the code on the Payments Council website, which maintains a public register of UK sorting codes.
How sorting codes are structured
The six digits break down into three pairs, and each pair carries information about where your account lives in the banking system. The first pair — digits one and two — is the bank code. Barclays is always 20, HSBC is always 40, Lloyds is always 30. There are around 200 different bank codes in use across the UK and Ireland.
The second pair — digits three and four — is the branch code. This identifies the region or processing centre, not always a physical building. A large city might have one code for all its branches, or the code might represent a processing centre that handles accounts from multiple locations. The third pair — digits five and six — is the branch identifier, which pinpoints the exact branch where your account is registered.
This structure means that if you move to a different branch of the same bank, your sorting code may change. If you switch banks entirely, it will definitely change. Your account number, by contrast, usually stays the same even if you move branches within the same bank.
What happens if you use the wrong sorting code
If you enter an incorrect sorting code when sending money, the payment will go to the wrong bank or the wrong branch. The receiving bank will see that the account number does not match any account at that branch and will reject the payment. The money will then be returned to your account, but this process takes several days — usually three to five working days.
During that time, your money is in limbo. If you were trying to pay a bill or send money urgently, the delay can cause problems. Some receiving banks will attempt to match the payment to an account based on the account number alone, even if the sorting code is wrong, but you cannot rely on this. The safest approach is to double-check both the sorting code and the account number before you send anything.
Sorting codes versus account numbers
A sorting code and an account number work together but do different jobs. The sorting code tells the payment system where the account is — which bank and which branch. The account number tells it which account at that location. You need both to send money successfully.
An account number is usually eight digits long, though some banks use fewer. It is unique within that branch but not across the whole bank — two different branches might have accounts with the same number. That is why the sorting code is essential: it narrows down the location so the account number can identify the right account.
When you give someone your details for a payment, you will often see them written as "sort code and account number" or "SC and AN". Some forms ask for them separately; others ask for them together. Either way, both pieces of information are required.
Sorting codes for international payments
If you are sending money to someone outside the UK and Ireland, you will not use a sorting code. Instead, you will need an IBAN (International Bank Account Number) or a SWIFT code (also called a BIC code). These serve the same purpose as a sorting code — they route money to the correct bank and branch — but they work across international borders.
An IBAN is a longer number that includes the country code, the bank code, and the account number all in one string. A SWIFT code is a shorter code that identifies the bank and branch only; you usually need the IBAN as well. Different countries use different systems, so the information you need depends on where the money is going. Your bank can tell you which code to use for a specific country.
Why sorting codes matter for direct debits and standing orders
Sorting codes are not just for one-off payments. They are also required for direct debits and standing orders — the automatic payments that come out of your account on a regular schedule. When you set up a direct debit to pay a bill, you give the company your sorting code and account number so they can take money from your account on the agreed date each month.
If you provide the wrong sorting code, the direct debit will fail. The company will not be able to collect the payment, and you may be charged a fee or have your service interrupted. This is why it is important to check your sorting code carefully before you set up any automatic payment, not just one-off transfers.
Frequently Asked Questions
Can I use the same sorting code for all my accounts at the same bank?
Not necessarily. If you have accounts at different branches of the same bank, each account may have a different sorting code. Check each account separately — do not assume they are the same. Your online banking will show the correct code for each account.
What if my bank branch has closed?
Your sorting code remains valid even if the physical branch closes. The bank will have moved your account to another branch, but the sorting code you were given will still route payments correctly. You do not need to update it.
Is a sorting code the same as a bank code?
No. A bank code is just the first two digits of the sorting code and identifies the bank itself. The full sorting code includes the bank code plus the region and branch identifiers. When someone asks for your sorting code, they want all six digits.
Do I need a sorting code to receive money?
Yes. Anyone sending you money will need your sorting code and account number. You should give both pieces of information to anyone who needs to pay you — your employer, a customer, a friend, or a service provider.
Can sorting codes change?
Sorting codes can change if your bank restructures its branches or merges with another bank. Your bank will notify you if this happens and will give you a new sorting code. Check your statements or online banking regularly to make sure you are using the current code.