UK Sort Code Format Parse Tool
Parse exact UK sort-code notation and preserve leading zeros; format normalization only, no bank/branch assignment, account match, checksum or payment-network eligibility.
Description
A UK sort code is a text identifier whose leading zeros matter.
A UK sort code is a text identifier whose leading zeros matter. Formatting can be normalized without identifying the assigned bank or branch.1
The returned values include Canonical sort code digits, Hyphenated sort code. The How section below explains the calculation, input rules and interpretation.
When to use UK Sort Code Format Parse Tool
Use UK Sort Code Format Parse Tool when you need to evaluate the supplied records under the calculation and evidence rules below. No bank/branch assignment, checksum, account match or network eligibility is verified.
Prepare observed financial records and verified caller terms. Use one currency for integer minor-unit money and preserve leading zeros in identifier text. One basis point is 0.01 percentage points. Resolve dates, local clocks, counting rules and evidence flags as specified.
How to use UK Sort Code Format Parse Tool and understand its results
- Prepare observed financial records and verified caller terms. Use one currency for integer minor-unit money and preserve leading zeros in identifier text. One basis point is 0.01 percentage points. Resolve dates, local clocks, counting rules and evidence flags as specified.
- Enter sortCodeText using the field table and calculation rules, then run the tool.
- Read canonicalSortCodeDigits, hyphenatedSortCode. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| sortCodeText | Sort code text | string | Required |
Enter exactly six ASCII digits or DD-DD-DD notation, without outer whitespace or newline. Return canonical six-digit text and hyphenated text, preserving zeros. Unsupported syntax is an input error.
canonical=removeHyphens(text); display=DD-DD-DD Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| canonicalSortCodeDigits | Canonical sort code digits | string |
| hyphenatedSortCode | Hyphenated sort code | string |
{
"input": {
"sortCodeText": "01-02-03"
},
"output": {
"canonicalSortCodeDigits": "010203",
"hyphenatedSortCode": "01-02-03"
}
} Limitations and assumptions
No bank/branch assignment, checksum, account match or network eligibility is verified.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Australia BSB Format Validator: An Australian BSB is a text identifier whose leading zeros must survive parsing. Its component positions do not establish a live branch. For a complementary task, use MICR Line Routing Account Parser: Normalized MICR notation separates routing, account and check serial text. Explicit delimiters preserve leading zeros without guessing an OCR layout.
References
-
UK Sort Code Format Parse Tool — tool.io
Similar or alternative tools
- Australia BSB Format Validator
An Australian BSB is a text identifier whose leading zeros must survive parsing. Its component positions do not establish a live branch.
- MICR Line Routing Account Parser
Normalized MICR notation separates routing, account and check serial text. Explicit delimiters preserve leading zeros without guessing an OCR layout.