Bank Code & Payment Tools

UK Sort Code Finder

Check a UK sort code and account number: the six-digit format, the bank the leading digits belong to in a dated offline list, and the modulus check that the industry rules define, with every step shown.

  • Format and modulus verdict
  • Bank from the dated list
  • Working shown, CSV export
Runs in your browser

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics.

UK sort codes workspace

1 Sort code and account

Try:

Six digits. Dashes and spaces are ignored.

Eight digits for the standard modulus check. It stays in this tab.

2 Weighting row (for the modulus check)

The MOD10, MOD11 and DBLAL algorithms are published in Vocalink's specification and are implemented here in full. The weighting table itself is Vocalink's own file, valacdos.txt, which this site does not redistribute. Paste the line that covers your sort code and the check runs with the working shown.

One row per line. A row carrying one of the fourteen exception codes is reported as out of scope rather than checked wrongly.

3 Result

Enter a sort code and the format check and indicative bank appear here.

What the UK Sort Code Finder does

This page does three separate things to a UK sort code and says which is which: it checks the six-digit format, it names the bank the leading two digits indicatively belong to from a small dated list, and - when you supply the weighting row for that sort code - it runs the published MOD10, MOD11 and DBLAL modulus algorithms over the sort code and account number with every product shown.

The algorithms come from Vocalink's 'Validating account numbers' specification and are implemented here in full. The weighting table, valacdos.txt, is Vocalink's own file and is not redistributed on this site, so you paste the line that covers your sort code. That is the honest arrangement: you get a real modulus check with real working, and nobody ships a stale copy of somebody else's table.

Everything runs in this browser tab. Account numbers are not uploaded, logged or stored.

How to use it

  1. Enter the sort code. The format check and the indicative bank appear immediately.
  2. Add the eight-digit account number if you want the modulus check.
  3. Download valacdos.txt from Vocalink, find the row whose start and end sort codes bracket yours, and paste that line into the weighting box. A row is a start code, an end code, a method (MOD10, MOD11 or DBLAL) and fourteen weights.
  4. Read the working: every digit of the sort code and account number, its weight, the product and what it contributes to the total. DBLAL adds the digits of each product instead of the product itself.
  5. Export the working as CSV or JSON if you are documenting a validation rule.

Reading the results

The format check is decisive and trivial: six digits, nothing else. It catches a truncated or mistyped code and nothing more.

The bank name is indicative. It comes from the leading two digits and a short dated list, and allocations move with mergers and brand migrations. Pay.UK's Industry Sorting Code Directory is the authority.

A modulus pass means the sort code and account number are arithmetically consistent under the rule the industry publishes for that range. It is a genuinely strong check - far stronger than the US or Australian equivalents, which have none - but it still says nothing about whether the account is open.

Some ranges are checked twice, with two rows and two different methods, and some carry one of the fourteen documented exceptions that change the digits, the weights or the pass condition. This page runs the standard check and reports an exception row as out of scope rather than producing a confident wrong answer.

Worked example: a MOD11 check worked through by hand

Take the illustrative weighting row the example button loads: method MOD11, weights 0 0 0 0 0 0 7 5 8 3 4 6 7 8. The first six weights are zero, so the sort code does not contribute and only the eight account digits matter. (This row is a teaching example, not a line from valacdos.txt.)

With account number 12345675 the products are 1x7 = 7, 2x5 = 10, 3x8 = 24, 4x3 = 12, 5x4 = 20, 6x6 = 36, 7x7 = 49 and 5x8 = 40. They add to 198, and 198 is 18 x 11 exactly, so the MOD11 check passes.

Change the last digit to an 8 and its contribution becomes 64 instead of 40, so the total is 222. Dividing 222 by 11 leaves 2, so the check fails. Under DBLAL the arithmetic differs in one step: a product of 14 contributes 1 + 4 = 5 rather than 14, which is why the working table shows the product and the contribution as separate columns.

Formulas and scoring rules

MOD10
sum(digit x weight) mod 10 = 0Fourteen digits: six of sort code then eight of account number.
MOD11
sum(digit x weight) mod 11 = 0Same layout; the modulus is eleven.
DBLAL
sum(digitsum(digit x weight)) mod 10 = 0Double alternate: a product of 14 contributes 1 + 4 = 5.

Why the weighting table is not bundled

Vocalink publishes valacdos.txt as the industry's weighting table and updates it regularly - roughly every few weeks, as ranges are reallocated. Copying a version of it onto a web page has two problems. The obvious one is that it goes stale, and a stale weight row produces a confident wrong verdict on a perfectly good account number. The less obvious one is that it is somebody else's data file, distributed under their terms.

Implementing the algorithms and asking you for the row solves both. The algorithms are described in the specification and do not change; the table changes constantly and belongs to Vocalink. You get the same answer their software would give, with the working visible, and you can see exactly which row produced it.

What the modulus check is actually for

It was introduced so that a payment with a mistyped account number would be rejected before it entered the clearing system, rather than credited to somebody else's account and reclaimed afterwards. It does that job well: with a MOD11 rule in place, a single wrong digit has roughly a one in eleven chance of slipping through instead of arriving somewhere unintended.

It was never intended to answer the question people now ask of it - does this account belong to the person I am paying. That question is answered by Confirmation of Payee, which checks the name against the account at the receiving bank. A modulus pass and a Confirmation of Payee match are different claims, and only the second one is about a person.

Limitations: what the result does not prove

  • Format, an indicative bank name and - with a weighting row - a modulus check. None of these confirms that the account exists, that it belongs to your payee, or that a payment will arrive.
  • The bank list is short, dated and organised by two leading digits. Several banks hold more than one range and newer institutions share ranges, so treat a match as a hint and the Industry Sorting Code Directory as the answer.
  • Without a weighting row no modulus check is run, and the page says so rather than reporting a pass.
  • The fourteen documented exception rules are not implemented. A row carrying an exception code is reported as out of scope, and account numbers that are not eight digits are refused rather than guessed at.

Privacy: where your data goes

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.

Standards and sources

Frequently asked questions

What is a UK sort code?

Six digits, written in three pairs, that identify a bank and a branch inside the UK clearing system. The first two digits are the bank; the rest narrow it to a branch or, increasingly, to a processing centre rather than a building you can walk into.

Can you tell which bank a sort code belongs to?

Approximately, from the first two digits - 20 is Barclays, 40 is HSBC UK, 30 and 77 are Lloyds, 12 and 80 are Bank of Scotland. This page shows that indicatively. The definitive answer is the Industry Sorting Code Directory operated by Pay.UK, because allocations move when banks merge or rebrand.

What is a modulus check on a UK account number?

A weighted arithmetic test, defined per sort code range, that the sort code and account number together must satisfy. There are three algorithms - MOD10, MOD11 and DBLAL - and each range has its own row of fourteen weights. It exists to catch mistyped account numbers before a payment leaves.

Why do I have to paste the weighting row myself?

Because the table is Vocalink's file, it changes every few weeks, and a stale copy would fail valid account numbers while passing invalid ones. The algorithms are stable and are implemented here; the data is downloaded from Vocalink by you, so the check you get is current.

Does a modulus pass mean the account exists?

No. It means the two numbers are arithmetically consistent with the rule for that range. Accounts that were never opened, or have been closed, satisfy the arithmetic just as well as live ones. Confirmation of Payee is the service that checks a name against a live account.

My account number is six digits - why is it refused?

The standard check needs eight. Shorter and longer account numbers are handled by the specification's exception rules, which change the digits used and sometimes the pass condition. This page does not implement those, so it declines rather than producing a wrong verdict. Your bank will usually tell you how to pad the number to eight digits.

Is it safe to type my account number here?

The page never sends it anywhere - the modulus arithmetic runs in your browser and you can confirm that in the network panel. As a general habit, though, treat a sort code and account number together as sensitive: they are enough to set up a direct debit.

Why are some sort codes checked twice?

Some ranges have two weighting rows with two different methods, and both must pass - or, under certain exceptions, either one passing is enough. This page applies the first row that covers your sort code and shows which one it used, so a second row is a deliberate extra step rather than something it hides.

Last reviewed by the A2Z.Tools team against the sources listed above.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.