A sort code is a six-digit number that identifies a specific UK bank and branch. Paired with an eight-digit account number, it tells the payment system exactly where to send money, and is usually written as three pairs of digits.
In one line: A sort code is the six-digit code that identifies the bank and branch holding an account.
How a sort code works
The six digits are split into three pairs, such as 12-34-56. The first pair identifies the banking group and the rest pinpoint the branch or processing centre that holds the account.
To pay someone, both their sort code and account number are needed, for example sort code 04-00-04 with an eight-digit account number. The system uses the pair together to route the payment.
Confirmation of Payee checks the recipient name against those details before a transfer completes, which helps catch a mistyped sort code or account number before money leaves the account in error.
Sort code vs IBAN
A sort code and account number are used for domestic UK payments. An IBAN packages the same information in an international format for cross-border transfers.
A sort code identifies the branch, while the account number identifies the account within it, so both are always needed together to direct a payment.
Primary source: Pay.UK (UK payment standards)