UK Sort Code Validator & Bank Lookup

Sort Code Generator

Generate a structurally valid test sort code with a known bank prefix. Output is for testing only — not a real branch.

Frequently Asked Questions

A sort code validator checks whether a 6-digit UK sort code is valid by verifying its format (XX-XX-XX) and existence in the official HMRC directory. It returns the bank name associated with the sort code prefix.

Enter the 6-digit sort code (e.g., 200000 or 20-00-00) and click Validate. The tool checks format and looks up the bank from the HMRC directory (18,000+ codes, updated monthly).

Yes. Select a bank prefix and click Generate to create a structurally valid test sort code. Generated codes are for testing only — not real bank branches.

Yes. No signup, no API key, no installation required. Runs entirely in your browser using the latest HMRC data.

It validates against the official HMRC sort code directory. If the sort code exists in the directory, it's a valid UK bank branch code.

What is a UK Sort Code?

A sort code is a 6-digit code identifying UK bank branches for domestic payments (BACS, CHAPS, Faster Payments). Format: XX-XX-XX — typically displayed with hyphens. The first 2 digits identify the bank, the next 4 identify the branch. This sort code validator checks format and looks up the bank from the official HMRC directory (18,000+ codes, updated monthly) — all locally in your browser.

How sort code validation works

  1. Format: 6 digits (spaces/hyphens ignored).
  2. Lookup: Match against HMRC directory for validity.
  3. Bank identification: First 2 digits map to major UK banks.

Major UK Bank Prefixes (First 2 Digits)

Related Tools