How to use the uk sort code and account number formatter
- Paste the details, one pair per line. The sort code and account number can be separated by spaces, hyphens, commas or tabs.
- Choose how to write the sort code: 12-34-56, 12 34 56 or 123456.
- Choose whether short account numbers (6 or 7 digits) are padded to 8 digits with leading zeros.
- Read the formatted pairs and the note on each line, then copy the good ones or download the table as a CSV file.
Formula
digits = every digit on the line, with all other characters removed
sort code = first 6 digits, written in pairs
account number = the remaining 6 to 8 digits, padded on the left to 8 if chosen
A line must hold 12 to 14 digits in total. Lines with letters, or with too few or too many digits, are listed with a reason and not changed.
Mixed layouts in one list
The line 654321 1234567 holds 6 + 7 = 13 digits. The sort code is 65-43-21 and the 7 digit account number is padded to 01234567. The line 20 00 00, 55779911 becomes 20-00-00 and 55779911, and 12-34-56 12345678 stays as it is.
In the sample list 4 of 6 lines are formatted. The line 112233 98765 has only 11 digits and the line SC 12-34-56 12345678 contains letters, so both are listed with the reason. All the numbers are made up.
Format only
This tool tidies layout. It does not check that a sort code exists, that an account number belongs to it, or that the numbers pass any bank check. A neat looking pair can still be wrong, so always confirm payment details with the payee through a channel you trust before you send money.
For international account numbers, the IBAN Checker and Builder checks the structure of an IBAN. For a whole bank statement, use the Bank CSV Normalizer, and to see whether a wrong total could come from swapped digits, use the Transposition Error Detector.
Padding short numbers
Account numbers are usually 8 digits. Some systems drop leading zeros, so a number can arrive as 6 or 7 digits. Padding with zeros on the left restores it. Turn the box off to leave short numbers as they are when you want to see which lines came in short.
Assumptions and limits
- The sort code is always the first 6 digits of the line and the account number is the rest.
- Only digits and separators (spaces, hyphens, commas, semicolons, colons, dots, slashes and tabs) are accepted.
- Output sort codes are checked against the pattern two digits, two digits, two digits.
- Formatting an already formatted line does not change it.
- Up to 1,000 lines are accepted and nothing is sent anywhere.
Frequently asked questions
Does this check that the account exists?
No. It only changes the layout. Account checking needs the bank's own data, which this page does not have.
Why was my line rejected?
It did not have 12 to 14 digits in total, or it contained letters. The note on the line says which.
What if the sort code has a leading zero?
Leading zeros are kept. 000099 is written 00-00-99.
Can I use this for other countries?
No. The rules here fit UK sort codes and account numbers. Other countries use different layouts.