UK Sort Code Generator
FinanceGenerate valid-format UK bank sort codes for testing. Sort codes identify UK bank branches and are used for domestic payments and direct debits.
Generate Sort Codes
What is a Sort Code?
A sort code is a 6-digit number (formatted as XX-XX-XX) that identifies a specific UK bank branch. It's used together with an account number for domestic payments.
- First 2 digits: Bank identifier
- Next 2 digits: Branch area
- Last 2 digits: Specific branch
UK Bank Prefixes
What is This Tool?
A sort code generator creates realistic UK bank sort codes — the 6-digit numbers (formatted as XX-XX-XX) that identify specific bank branches in the United Kingdom. Sort codes are used alongside account numbers for domestic payments, direct debits, and BACS transfers.
UK sort codes are administered by the Bankers' Automated Clearing System (BACS). The first two digits typically identify the bank, while the remaining four identify the branch. This tool generates properly formatted sort codes for testing UK banking integrations.
Common Use Cases
UK Payment Testing
Test Faster Payments, BACS, and CHAPS payment integrations with properly formatted sort codes and account numbers.
Direct Debit Setup
Validate GoCardless, Stripe BACS, and other direct debit mandate flows with realistic UK banking details.
Open Banking APIs
Test open banking integrations with TrueLayer, Plaid, or Yapily using format-correct UK bank identifiers.
Form Validation
Test sort code input masking (XX-XX-XX format), validation rules, and bank lookup functionality in web forms.
Frequently Asked Questions
Are generated sort codes real branches?
Generated sort codes follow the correct 6-digit format but may not correspond to real bank branches. They are for format and validation testing only.
What format do sort codes use?
UK sort codes are 6 digits, typically displayed as three pairs separated by hyphens (e.g., 20-00-00). The first two digits usually identify the bank.
How are sort codes different from routing numbers?
Sort codes are the UK equivalent of US ABA routing numbers. Sort codes are 6 digits identifying UK bank branches, while routing numbers are 9 digits identifying US financial institutions.