A sort code is a six-digit number that identifies which bank branch holds your account
When you give someone your bank details to send you money, you give them three things: your account number, your name, and your sort code. The sort code tells the sending bank which branch of your bank to route the money to. It is used only in the United Kingdom and Ireland — other countries use different systems, like routing numbers in the United States or bank codes elsewhere.
Think of it this way: your account number is like your house address, but your sort code is the postcode that tells the mail carrier which delivery office handles your street. Without the sort code, the money might reach your bank, but the bank would not know which of its branches should credit your account.
You will see sort codes written as three pairs of numbers separated by hyphens — for example, 20-17-80. Some documents or forms may show it without hyphens (201780), but it is the same six digits either way.
Key Takeaways
- A sort code is a six-digit number unique to your bank branch, written as three pairs separated by hyphens (for example, 20-17-80).
- You need your sort code whenever someone sends you money by bank transfer, standing order, or direct debit.
- Your sort code appears on your debit card, cheque book, bank statements, and online banking — you do not have to memorize it.
- The first four digits identify your bank; the last two identify your specific branch.
- If you move branches or switch banks, your sort code may change, so always check your current details before giving them out.
Where to find your sort code
Your sort code is printed on several places you already have. The easiest place to look is your debit card — it appears on the front, usually below your name. If you have a cheque book, the sort code is printed at the bottom left of every cheque, before your account number.
You can also find it on your bank statements (paper or online), in your online banking app or website, or by calling your bank's customer service number on the back of your debit card. If you are new to banking and do not yet have a debit card or statements, your bank will have given you a welcome letter that includes your sort code.
Many banks also publish a complete list of their sort codes on their website, organized by branch location. If you know which branch you use, you can search for it there.
What the six digits mean
A sort code breaks down into two parts. The first four digits identify your bank — for example, all Barclays accounts start with 20-17, and all HSBC accounts start with 40-05. The last two digits identify your specific branch within that bank.
This structure matters because some large banks operate many branches across the country, and each one has its own sort code. If you opened your account at the Nottingham branch of your bank, your sort code will be different from someone who opened theirs at the London branch, even though you both bank with the same company.
However, for most modern transfers, the exact branch does not matter as much as it once did. Banks can now route money correctly using just your account number and sort code, regardless of which branch you visit or where you opened the account.
When you need to provide your sort code
You need your sort code whenever money is being sent to your account by electronic transfer. This includes receiving wages from an employer, setting up a standing order to pay a bill, receiving a refund, or asking a friend to send you money via bank transfer.
You also need it if someone is setting up a direct debit on your account — for example, to pay your council tax, utilities, or insurance. The organization taking the payment will ask for your sort code and account number together.
You do not need your sort code for cash withdrawals, in-branch payments, or cheque deposits. You only need it for electronic transfers in and out of your account.
What happens if you give the wrong sort code
If you give someone an incorrect sort code, the money will usually be sent to the wrong bank or branch. The sending bank's system will reject it or route it to a different account. In either case, the money does not reach you.
The person who sent the money will see that the transfer failed or bounced back. They can then correct the sort code and try again. This process can take a few days, so it is worth double-checking before you give out your details.
If money is sent to the wrong account by mistake, the receiving bank can sometimes trace it and return it, but this takes time and effort. Always verify your sort code is correct before sharing it.
Sort codes and account security
Your sort code is not secret information in the way your PIN or password is. It is safe to share it with anyone who needs to send you money — employers, friends, organizations you pay bills to. Knowing your sort code alone, someone cannot access your account or take money out.
However, you should never share your sort code along with your account number, name, and other details with someone you do not trust. Together, these pieces of information can be used to set up unauthorized payments from your account. If someone asks for your sort code and account number but you did not initiate the request, check with your bank before providing it.
Your bank will never ask you for your sort code by email, text, or phone call. If someone claiming to be from your bank asks for it, hang up and call your bank directly using the number on your debit card.
What to do if you change banks or branches
If you switch to a different bank, you will receive a new sort code with your new account. If you move to a different branch of the same bank, your sort code may or may not change — this depends on the bank's system. Some banks assign a sort code to a branch; others assign one to each account.
When you close an old account and open a new one, make sure you update your sort code with anyone who sends you regular payments — your employer, your landlord, or any organization with a standing order or direct debit set up. Payments sent to your old sort code will fail once the account is closed.
Many banks offer a Current Account Switch Service that handles this automatically. If you use it, the bank will contact your employers and billers on your behalf and update your sort code with them. This service is free and takes about seven working days.
Frequently Asked Questions
Is a sort code the same as a routing number?
No. Sort codes are used in the UK and Ireland. Routing numbers are used in the United States and serve the same purpose — they identify which bank branch should receive a transfer. Other countries use different systems with different names.
Can two people at the same bank have the same sort code?
Yes, if they use the same branch. Your sort code identifies your branch, not your individual account. Your account number is what makes your account unique. Together, sort code and account number identify you specifically.
What if I do not have a debit card yet?
Your bank will have sent you a welcome letter or pack when you opened your account — your sort code is in there. You can also log into your online banking, call your bank's customer service line, or visit a branch in person and ask staff to write it down for you.
Do I need my sort code to withdraw cash from an ATM?
No. You only need your debit card and PIN to withdraw cash. Sort codes are only for electronic transfers and direct debits — payments that go between bank accounts electronically.
What if someone has my sort code and account number?
They cannot withdraw money or access your account with just those two pieces of information. However, they could potentially set up a direct debit or standing order without your permission. If you are concerned, contact your bank when ready and ask them to flag your account or require additional security for new payments.