How to Find the Sort Code in an IBAN: A Detailed Step-by-Step Guide
To find the sort code within a UK IBAN, identify the characters from the 9th to the 14th position. For example, in the IBAN GB29 BARC 201234 12345678, the sort code is 20-12-34. This six-digit sequence follows the four-letter bank iden...
To find the sort code within a UK IBAN, identify the characters from the 9th to the 14th position. For example, in the IBAN GB29 BARC 201234 12345678, the sort code is 20-12-34. This six-digit sequence follows the four-letter bank identifier and precedes the eight-digit account number.
Contents
The International Bank Account Number (IBAN) is a standardized international system developed to identify bank accounts across national borders. While the IBAN is a singular, long string of alphanumeric characters, it is actually composed of several distinct data elements. For customers in the United Kingdom and Ireland, one of the most critical elements hidden within this string is the sort code.
As of 2026, despite the increasing prevalence of seamless digital payment interfaces and biometric authentication, the need to manually extract a sort code from an IBAN remains a common requirement for setting up standing orders, domestic Bacs transfers, or verifying account details for legacy financial systems. Understanding the architecture of these identifiers ensures that manual entries are accurate, reducing the risk of failed payments or misdirected funds.
Understanding the Architecture of an IBAN
Before attempting to extract specific digits, it is essential to understand why an IBAN is structured the way it is. The system is governed by the ISO 13616 standard. The primary purpose of an IBAN is to facilitate "straight-through processing" (STP) in international electronic payments. By including check digits and a standardized format, the receiving bank's system can automatically verify that the account information is likely correct before the transfer is even initiated.
An IBAN can contain up to 34 alphanumeric characters, but the length is fixed for each country. In the United Kingdom, an IBAN is always 22 characters long. In the Republic of Ireland, it is 22 characters. Other countries, such as Norway (15 characters) or Malta (31 characters), utilize different lengths based on their domestic banking requirements.
Every IBAN follows a specific hierarchy:
- Country Code: Two letters representing the nation where the account is held (e.g., GB for the UK, IE for Ireland).
- Check Digits: Two numbers calculated using a MOD-97 algorithm that allow banks to verify the integrity of the entire string.
- Basic Bank Account Number (BBAN): This is the country-specific part of the IBAN. In the UK and Ireland, the BBAN contains the bank’s identifier, the sort code, and the account number.
Identifying the Sort Code in a UK IBAN
In the United Kingdom, the sort code is a six-digit number used to identify both the bank and the specific branch where an account is held. When the UK adopted the IBAN standard, it integrated the existing sort code and account number system into the BBAN portion of the identifier.
To find the sort code in a UK IBAN, you must count the characters starting from the very beginning of the string. The sort code occupies positions 9 through 14.
Step-by-Step Extraction for UK Accounts
- Locate the full IBAN: Ensure you have the full 22-character string. It will always begin with "GB".
- Ignore the first eight characters: The first two letters (GB), the two check digits (e.g., 29), and the four-letter bank identifier (e.g., BARC, MIDL, BOFA) are not part of the sort code.
- Identify positions 9 to 14: The next six digits you encounter are your sort code.
- Format the code: While the IBAN presents these as a continuous string, sort codes are traditionally written in pairs separated by hyphens (e.g., 11-22-33).
For example, consider the following IBAN: GB 29 ABCD 102030 12345678
- GB: Country Code
- 29: Check Digits
- ABCD: Bank Identifier (often a shortened version of the bank's name)
- 102030: This is the Sort Code.
- 12345678: This is the Account Number.
Extracting the Sort Code in an Irish (IE) IBAN
The Republic of Ireland also uses sort codes, though they are sometimes referred to as "national bank codes." Similar to the UK, the Irish IBAN is 22 characters long and follows a very similar internal structure, but with a few distinct differences in how the bank identifier is formatted.
In an Irish IBAN (beginning with "IE"), the sort code is also found at positions 9 through 14. However, the four characters preceding the sort code (positions 5 to 8) are always alphanumeric bank codes, such as AIBK (Allied Irish Banks) or BOFI (Bank of Ireland).
Example of an Irish IBAN extraction: IBAN: IE 45 AIBK 931152 12345678
- IE 45: Country code and check digits.
- AIBK: Bank identifier.
- 931152: The Sort Code.
- 12345678: The Account Number.
Summary Table: IBAN Component Mapping
The following table breaks down the 22 characters of a standard British or Irish IBAN to help you visualize exactly where the sort code sits in relation to other data.
| Character Position | Component Name | Data Type | Example (UK) | Purpose |
|---|---|---|---|---|
| 1 - 2 | Country Code | Alpha | GB | Identifies the jurisdiction (United Kingdom). |
| 3 - 4 | Check Digits | Numeric | 29 | Validates the IBAN using MOD-97. |
| 5 - 8 | Bank Identifier | Alpha | BARC | Identifies the specific banking institution. |
| 9 - 14 | Sort Code | Numeric | 201234 | Identifies the specific bank branch. |
| 15 - 22 | Account Number | Numeric | 12345678 | Identifies the individual's unique account. |
Why the Sort Code is Extracted Individually
Even in 2026, domestic payment systems like Faster Payments, Bacs (Bankers' Automated Clearing System), and CHAPS (Clearing House Interbank Payments System) in the UK often operate using the traditional Sort Code and Account Number format rather than the full IBAN.
While international transfers (typically processed via the SWIFT network or SEPA for Euro payments) require the full IBAN, domestic employers, utility companies, and peer-to-peer payment apps frequently ask for the 6-digit sort code. If you only have an IBAN on hand—perhaps from a printed statement or a "details" tab in a banking app—knowing how to isolate the sort code allows you to complete these domestic forms without needing to contact your bank for clarification.
Identifying Components in Non-UK/Irish IBANs
It is important to note that the term "Sort Code" is specific to the British and Irish banking systems. If you are looking at an IBAN from Germany (DE), France (FR), or Spain (ES), you will not find a "sort code" in the traditional sense. Instead, these countries use different internal structures within their BBAN:
- Germany (DE): Uses an 8-digit Bankleitzahl (BLZ) starting at position 5, followed by a 10-digit account number.
- France (FR): Uses a 5-digit Code Banque, a 5-digit Code Guichet (branch code), an 11-digit account number, and 2 Clé RIB (check digits).
- USA: The United States does not use the IBAN system for domestic transfers, relying instead on ABA Routing Transit Numbers.
If you are attempting to find a "sort code" for a non-UK account, you are likely looking for the Branch Code or Bank Code. Always check the specific ISO requirements for that country, as the character positions will differ significantly from the UK model.
Common Pitfalls and Troubleshooting
When extracting a sort code, several common errors can lead to failed transactions.
1. Miscounting Positions
The most frequent mistake is starting the count from the wrong character. Remember that the "GB" or "IE" at the beginning counts as positions 1 and 2. If you start counting from the first number instead of the first letter, your sort code will be offset and incorrect.
2. Confusing the Bank Identifier with the Sort Code
Some people mistake the four letters (e.g., "HSBC") for part of the sort code. In a standard IBAN, the sort code is strictly numeric. If your extracted "code" contains letters, you have shifted too far to the left in the character string.
3. Handling Spaces and Formatting
IBANs are often printed in groups of four characters (e.g., GB29 ABCD 1234 56...) to make them easier to read. When counting positions to find the sort code, ignore the spaces. The sort code is always the 9th through 14th alphanumeric characters, regardless of how they are spaced on a page.
4. Validity of the IBAN
If you have extracted the sort code but the destination system rejects it, the IBAN itself might be invalid. You can verify the integrity of an IBAN using a validator tool that checks the MOD-97 checksum. Organizations like SWIFT provide resources for understanding these standards, though they primarily serve financial institutions.
Safety and Security Best Practices
While your IBAN and sort code are necessary for receiving funds, they should still be treated with care. In the UK, a sort code and account number are generally considered "public-facing" financial data—meaning someone can use them to send you money, but they cannot (in theory) withdraw money or access your account with these details alone.
However, as of 2026, sophisticated "authorized push payment" (APP) fraud often involves scammers posing as bank officials. They may use your extracted sort code and account number to gain your trust by "verifying" your details over the phone. Always remember:
- Never provide your PIN or full banking password, even if the caller knows your IBAN or sort code.
- Only use official banking apps or verified websites to find your IBAN.
- Be cautious when sharing IBANs on invoices; verify the recipient's identity through a secondary channel if possible.
Frequently Asked Questions
Is the sort code always 6 digits in an IBAN?
Yes, for UK and Irish IBANs, the sort code is consistently six digits long. It is embedded within the 22-character string. If you are looking at an IBAN from another country, they do not use "sort codes," though they may have bank or branch codes of varying lengths (e.g., 5 digits in France).
Can I find my account number in the IBAN too?
Yes. In a UK or Irish IBAN, the account number consists of the final eight digits of the string (positions 15 through 22). Just as the sort code follows the bank identifier, the account number follows the sort code.
What if my IBAN doesn't have letters at positions 5 to 8?
While most major UK banks use a four-letter mnemonic (like HLFX for Halifax), some smaller institutions or specialized codes may use numbers in these positions. Regardless of whether characters 5 through 8 are letters or numbers, the sort code will still begin at position 9.
Do I need the sort code if I already have the IBAN?
It depends on the payment system. If you are making an international transfer via SEPA or SWIFT, the IBAN is usually sufficient as it contains the sort code within it. However, many domestic UK payment systems still require the sort code and account number to be entered into separate fields.
Is a BIC/SWIFT code the same as a sort code?
No. A BIC (Business Identifier Code) or SWIFT code identifies the bank globally, but it does not identify the specific branch in the same way a sort code does. While the 4-letter bank identifier in the IBAN often matches the start of the BIC, they are used for different purposes in the routing process.
Practical Recommendation
If you are frequently required to provide your banking details for domestic and international transactions, the most efficient method is to save your details in a "formatted" list within a secure password manager or your bank’s official app.
Instead of manually counting characters every time, record your details in the following format:
- Bank: [Name]
- Account Holder: [Name]
- Sort Code: [6 Digits]
- Account Number: [8 Digits]
- IBAN: [Full 22-Character String]
- BIC/SWIFT: [8 or 11 Characters]
By having these pre-extracted and verified, you eliminate the risk of miscounting the character positions in your IBAN and ensure that your domestic and international payments are processed without delay.