United Kingdom sort code validator
How the sort code format works
- Format
- 6 digits
- Example
- 123456
Things to watch for
- This checks the 6-digit format only — it doesn't confirm the sort code is actually assigned to a branch
- Full bank-account modulus checking (which combines the sort code with the account number) is a separate, heavier scheme not done here
- Sort codes are usually written with hyphens (e.g. 12-34-56) — strip those before matching
^[0-9]{6}$A sort code is the 6-digit number that identifies a bank and branch on UK and Ireland accounts, almost always written as three pairs separated by hyphens (e.g. 12-34-56) even though the underlying value is just six digits. The first couple of digits broadly signal which bank issued it — a legacy of the days when each bank had its own defined ranges — though that mapping has loosened as banks have merged and reassigned ranges over the years. Paired with an 8-digit account number, the sort code is what UK banks use to route a domestic transfer to the right branch and account, and both numbers are embedded directly inside a UK IBAN for international payments.
How this validator works
This tool checks that what you’ve entered is exactly six digits, stripping any hyphens or spaces first so “12-34-56” and “123456” both validate the same way. That’s the full extent of the check: a correctly shaped 6-digit number.
What a pass doesn’t tell you
Passing this check confirms the format only — it does not confirm the sort code, combined with an account number, would actually clear a payment. Real payment systems in the UK use a separate modulus-checking scheme (weighting and summing the sort code and account number digits against bank-specific rules published by Vocalink) to catch mistyped account details before money moves. This tool doesn’t implement that scheme, and a correctly formatted sort code isn’t proof it belongs to a currently active branch. Use this check to catch an obviously malformed number; use your bank’s own transfer verification for anything involving real money.
Content last reviewed 2026-07-09.
sort code FAQ
What does a sort code tell you?
A sort code identifies the bank and branch where an account is held. It's a 6-digit number, usually written as three pairs (e.g. 12-34-56), and the leading digits broadly point to which bank issued it. On its own it doesn't name an account holder or confirm a branch still operates.
Does this check my account number too?
No. This tool checks the sort code's 6-digit format only. Confirming a sort code and account number belong together uses a separate modulus-checking scheme (run by Vocalink for Bacs payments) that applies bank-specific weighting rules — that's a different, heavier check this page doesn't perform.
Does a valid format mean it's a real branch?
No. Passing this check only means the number has six digits in the right shape — it doesn't confirm the sort code is actually assigned to an active branch. Banks retire and reassign sort codes over time, so format validity and real-world validity are separate questions.