Validation and verification get used interchangeably and they are not the same thing. Validating a set of UK bank details means testing whether they could be real. Verifying them means finding out whether they are. Almost every tool on the internet does the first and is described in language that implies the second, so it is worth being precise about where the line falls.
What the standard rules do
UK account validation applies weighted modulus arithmetic to the sort code and account number together. Which rule applies depends on the sort code range, because different institutions adopted different schemes, and some ranges require two passes with an exception table for particular cases. The output is binary: these digits are consistent, or they are not. Payment software runs this at the point of entry so that an obvious typing error never becomes a failed payment two days later.
The exceptions are the interesting part
The rule set carries exceptions, and they exist because real institutions did idiosyncratic things. Some ranges substitute digits before the calculation, some accept a failure on the first pass if the second pass succeeds, and some accounts need zero padding to reach eight digits before any of it applies. A validator that implements the headline rule and none of the exceptions will reject perfectly good details, which is why occasional false failures are worth re-checking rather than acting on.
Where validation stops
Validation never asks the receiving bank anything. It is arithmetic performed on the digits in front of you, so it cannot know whether an account is open, whose it is, or whether it has been used to receive fraudulent payments before. The step that does ask is the name check, which runs when a payee is added and compares the name you typed against the name the receiving bank holds. Validation is a spell checker. The name check is the only routine thing that is closer to a fact.
Building validation into a process
If you are taking bank details from customers or suppliers, validate at entry so mistakes are caught while the person is still on the page, and verify separately through the name check and a callback on a known number before you pay anything substantial or change details you already hold. Treat a change of details as an event requiring positive confirmation rather than as an update, because invoice redirection fraud works precisely by looking like routine housekeeping.
Questions people ask about account number validation
What is the difference between validation and verification?
Validation tests whether details could be real using arithmetic. Verification finds out whether they are, which needs the receiving bank, and in practice means the name check.
Why do some valid accounts fail validation?
Because the rule set has exceptions by sort code range and some validators implement only the headline rule. A failure on details read from a bank's own app is worth double checking.
Do all UK account numbers have a check?
Most do, and the applicable rule depends on the sort code range. A few ranges have no rule at all, in which case nothing can be tested arithmetically.
Does validation work on international details?
No. An IBAN has its own check digits and its own validation rule, which is separate from the UK modulus scheme.