How to check a sort code & account number are valid?

Read time: 3 mins

Last updated: 6 May 2024

Each bank account number in the UK and Ireland is generated using an algorithm unique to that bank (and sometimes each branch within a bank). Bank account numbers are not generated sequentially, and the system used to generate them is designed to prevent account numbers from having similarity that can result in money being sent to the wrong account.

For example, a branch could generate an account number of "12345678" but would not generate an account number "12354678".

Bank Account & Sort Code Checker

Try our service for free

Sign up for a free trial to get

  • Limited daily checks*
  • Sort code, account, SWIFT and IBAN validation
  • All branch data and supported payment types

Want to automate these checks? Discover how to automate your account checking

How does it work?

Banks use a combination of "modulo" and "double-alternate" modulus checker algorithms, along with a set of "weights" to perform a mathematical calculation - all designed to help identify when account numbers have been entered correctly. The most common types of mistake are when numbers are swapped and these types of algorithms help identify that.

As new banks open and sort codes are issued, the algorithms for these banks need to be published and shared with banks. Mintly is constantly keeping its system updated with these new algorithms, so our customers have access to the latest data.

There are several ways to check an account number and sort code are valid. One is to obtain the directory of sort codes, and then implement the algorithms and weight database needed to perform the checks. This database then needs to be updated regularly whenever new data or algorithms are issued. To check a bank sort code is valid, you can use a lookup table and keep this table updated as the data changes.

Alternatively you can use a system like Mintly. Our database is updated weekly with the newest data and algorithms, and our stable API allows you to query a sort code, and account number. We'll tell you if it's valid and the types of payment that the branch supports. We make it really easy to integrate with existing systems too.

Lady checking sort code and account number are valid

Need a bank account checking solution for your business?

If you're looking for an online sort code and account number checker then our online tools can give you unlimited checks. Or use our free sort code checker tool where you can check five accounts a day totally free! If you need a sort code checker for faster payments, BACS or Direct Debit then Mintly tools can help you.

To use our bank sort code and account number checker, you can login to our web UI and submit the details; our fast service returns the answer and tells you the name, location and contact details of the bank branch based on the sorting code, and tells you whether it is a valid bank account. Note that the algorithms used can only say whether an account number is valid or not; the account number may not be in use.

Not only can Mintly check sort codes and account numbers, we also check IBAN (International Bank Account Number) and SWIFT codes, which are used when sending money internationaly.

How it works

Sign up to our bank account check API

Sign up and pick a plan to try free for 14 days

Try our sort code, bank account, IBAN and SWIFT check tools

Try our tools or use our API to integrate to your systems

Save money as invalid bank accounts are checked

See value right away, with higher payment success!

Automation - the next step to saving more money

For businesses wanting to automate their processes and integrate a sort code check or bank account modulus check into their own systems, Mintly offers an API (Application Programming Interface) that allows systems to talk to each other over the internet securely. Our API sends back all the bank details once validated, so that you can handle the next step in your workflow.

If you'd like to try Mintly out, we have a 14 day free trial for all our plans, or if you have further questions, please get in touch, we'd love to help you with your bank validation needs. Or book a demo with one of our experts, who are happy to help you get set up.