sort-codeuk-bankinggeneratortestinguk

UK Sort Code Generator for Testing - Random Bank Sort Codes Free

Rafael Andrade

By Rafael Andrade· Desenvolvedor

·3 min read

A UK sort code generator creates random bank sort codes in the correct XX-XX-XX format for software testing and form validation - without using real bank identifiers.

What is a UK Sort Code?

A UK sort code is a six-digit number used to identify individual UK bank branches for domestic payments. Sort codes work together with account numbers to route money to the correct bank and branch.

Sort codes are used in:

Sort Code Format

A sort code is always 6 digits, displayed as three pairs separated by hyphens:

XX-XX-XX

Example: 20-00-00 (Barclays Bank main sort code)

The first two digits identify the bank, and the remaining four digits identify the specific branch:

(Note: ranges are approximate; actual assignment is maintained by BACS.)

How to Use the Sort Code Generator

  1. Open the Sort Code Generator on UtilWave.
  2. Click Generate to create random sort codes in the XX-XX-XX format.
  3. Choose a batch size to generate multiple codes at once.
  4. Copy the generated codes for development, test data, or form testing.
  5. Generated codes are fictitious - they follow the format but are not registered with any real bank branch.

Sort Code vs IBAN

UK domestic payments use sort code + account number. International payments to and from UK accounts use IBAN (International Bank Account Number):

When building software for international transfers, you may need to handle both formats.

Why Developers Need Test Sort Codes

UK banking and fintech applications work with sort codes in:

Using real sort codes in non-production environments carries a risk of accidental payment routing and violates data minimization principles. Generated test sort codes satisfy format validation without this risk.

Sort Code Checker Services

For production applications, validate sort codes against the BACS Approved Sort Codes list (maintained by Pay.UK) and use a sort code lookup service to verify the bank name, payment schemes supported (Faster Payments, CHAPS, BACS), and branch information.

FAQ

Do all 6-digit combinations form valid sort codes? No - sort codes are assigned by Pay.UK (formerly BACS) to financial institutions. Not all numeric combinations correspond to real bank branches.

Is a sort code the same as a routing number in the US? Functionally similar - both identify a bank branch for domestic payments. The US uses 9-digit ABA routing numbers; the UK uses 6-digit sort codes.

What is an IBAN sort code? It is not a separate type. An IBAN for a UK account always contains the sort code embedded within it. When paying internationally from the UK, the sort code is part of the IBAN.

Can a sort code change? Yes - bank mergers, branch closures, and system migrations sometimes result in sort code changes. Customers affected are notified in advance.

Generate test sort codes instantly with the free Sort Code Generator.

Related tool

Sort Code Generator

Free to use, no sign-up.