Sort Code
GET/v0/gb/sort-code
Validates a UK sort code — the 6-digit number used to identify bank branches in the United Kingdom and Ireland. The code is formatted as three pairs of digits separated by hyphens (XX-XX-XX). This endpoint validates the format only. Spaces and hyphens in the input are stripped automatically.
Try it
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| value | string | Yes | The 6-digit sort code (e.g. 20-00-00) |
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.isvalid.dev/v0/gb/sort-code?value=20-00-00"
Response Fields
| Field | Type | Description |
|---|---|---|
| valid | boolean | Whether the sort code has a valid 6-digit format |
| sortCode | string | The normalized 6-digit sort code |
| formatted | string | Sort code in standard UK format (XX-XX-XX) |
Example Response
{
"valid": true,
"sortCode": "200000",
"formatted": "20-00-00"
}Example Response — invalid
{
"valid": false
}