BankCheck
HomeIBANRouting NumberSort CodeGuides
Home
IBAN
Routing Number
Sort Code
Guides

BankCheck

Validate any bank number instantly. Free and 100% client-side.

Your data never leaves the browser

Formats

IBAN40+ countriesRouting NumberUnited StatesSort CodeUK & Ireland

Info

GuidesCompareAlternativesAboutPrivacy PolicyTerms of UseAPI Docs

BankCheck checks whether a number could be valid based on format, length, and checksum rules. It does not verify that an account exists or confirm who it belongs to. Always confirm account details with your bank before making a payment.

© 2026 BankCheck

Sort Code Validation API

Validate UK sort codes with bank identification and BIC/SWIFT lookup. Accepts both hyphenated (20-00-00) and plain (200000) formats.

Valid Sort Code Example

bashRequest
curl "https://bankcheck.dev/api/v1/validate?q=20-00-00&format=uk-sort-code"
jsonResponse
{
  "apiVersion": "1",
  "processingTimeMs": 1,
  "result": {
    "valid": true,
    "format": "uk-sort-code",
    "normalized": "200000",
    "errors": [],
    "breakdown": {
      "formatName": "UK Sort Code",
      "parts": [
        { "label": "Bank ID", "value": "20", "start": 0, "end": 2 },
        { "label": "Branch (1)", "value": "00", "start": 2, "end": 4 },
        { "label": "Branch (2)", "value": "00", "start": 4, "end": 6 }
      ]
    },
    "bankInfo": {
      "bankName": "Barclays",
      "bic": "BARCGB22",
      "country": "United Kingdom",
      "countryCode": "GB",
      "city": "London"
    }
  }
}

Invalid Sort Code Example

bashRequest
curl "https://bankcheck.dev/api/v1/validate?q=99-99-99&format=uk-sort-code"
jsonResponse
{
  "apiVersion": "1",
  "processingTimeMs": 0,
  "result": {
    "valid": false,
    "format": "uk-sort-code",
    "normalized": "99-99-99",
    "errors": [
      {
        "code": "NOT_NUMERIC",
        "message": "Sort code must contain only digits",
        "suggestion": "Remove hyphens and enter 6 digits"
      }
    ],
    "breakdown": null,
    "bankInfo": null
  }
}

Breakdown Parts

FieldTypeDescription
Bank IDstring2-digit bank identifier (e.g. 20 = Barclays, 40 = HSBC, 60 = NatWest)
Branch (1)stringFirst part of the branch identifier
Branch (2)stringSecond part of the branch identifier

Error Codes

FieldTypeDescription
NOT_NUMERICerrorInput contains non-numeric characters after removing hyphens
WRONG_LENGTHerrorInput is not exactly 6 digits

Bank Lookup

The API identifies the bank for known sort codes, returning the bank name, BIC/SWIFT code, and city. The database covers 28 UK banks with 92 sort codes including Barclays, HSBC, Lloyds, NatWest, and more. See the sort code validator to browse all banks.

Format Hint

Sort codes are 6 digits, which can be ambiguous with other formats. Use the format=uk-sort-code parameter to skip auto-detection and ensure the input is validated as a sort code.

Back to API Docs.