A UK bank account is identified by two numbers: a 6-digit sort code and an 8-digit account number. Together they are enough to receive a domestic payment. For payments from abroad they are packed into a GB IBAN.
Sort code
The sort code is written as three pairs, for example 40-47-84. It identifies the bank and, historically, the branch. The first digits point to the bank group, but after mergers and with digital banks a sort code is not a reliable way to guess the bank: use the details the bank gives you.
Account number
The account number has 8 digits. Some older accounts have 6 or 7 digits: add leading zeros to make 8. A few building societies use a separate roll or reference number: put it in the payment reference.
Where to find your own details
- In your banking app, under the account or “account details”.
- On bank statements and cheques.
- On many UK debit cards (not all banks print them).
You cannot look up someone else's account number online. Ask the person or company you are paying: it is usually on their invoice.
Modulus check: do the numbers fit together?
Vocalink (Pay.UK) publishes weights for every sort code range. Multiplying the 14 digits by these weights and dividing by 10 or 11 tells you whether the account number can belong to that sort code. Banks and payment forms run this check to catch typos before a payment is sent. A pass does not mean the account exists or is open. Try it with the sort code checker.
Confirmation of Payee
When you add a new payee, most UK banks now check the name you typed against the name on the account and answer “match”, “close match” or “no match”. This is Confirmation of Payee. It protects against fraud and mistakes that a modulus check cannot see.
From sort code to GB IBAN
A UK IBAN has 22 characters:
| Part | Example | Length |
|---|---|---|
| Country code | GB | 2 |
| Check digits (mod 97) | 29 | 2 |
| Bank code (first 4 letters of the BIC) | NWBK | 4 |
| Sort code | 601613 | 6 |
| Account number | 31926819 | 8 |
Result: GB29 NWBK 6016 1331 9268 19 (the standard example from the IBAN registry). You cannot calculate the bank code from the sort code with a formula: get the IBAN from the bank. For test data, use the GB IBAN generator.
UK payment systems in one minute
- Faster Payments: most online and app transfers, usually seconds, up to the limit your bank sets.
- Bacs: Direct Debits and salaries, about three working days.
- CHAPS: same-day, high-value payments such as house purchases.
Test data for developers
Need sort codes and account numbers that pass the modulus check for forms and QA? The UK bank account generator creates them in bulk. They are random: never use them for real payments.