US bank routing number check API
Check the check digit and the first two digits of a US ABA routing number.
POST https://api.curatedapi.com/v1/calc/check/us-routing-number
- Version 1
- MCP tool
calc_check_us_routing_number - Try it in the browser
Checks a nine-digit ABA routing transit number: the first two digits must be in a range the American Bankers Association uses, and the ninth digit must be the check digit the first eight give with the weights 3, 7, 1.
Formula
3·(d₁ + d₄ + d₇) + 7·(d₂ + d₅ + d₈) + (d₃ + d₆ + d₉) must be a multiple of 10
- The number is checked by arithmetic alone. Nothing is looked up, so a valid result means the number is well formed, not that the account, company or security exists.
Inputs
Send numbers as strings to keep every digit. options sets precision and rounding (see numbers and rounding).
| Input | Type | Description |
|---|---|---|
number required |
string | The nine-digit routing number. Spaces, dots, hyphens and slashes are ignored, and lower-case letters are read as upper case. At most 64 characters. |
Result
Under result in the answer, next to exactness, precision, inputs, formula, references and warnings.
| Result | Type | Description |
|---|---|---|
valid | boolean | Whether the routing number passes every check. |
normalized | string | The number as it was checked: separators removed, letters in upper case. |
problem | string | What is wrong, when valid is false: CHARACTERS: a character that cannot appear in this kind of number; LENGTH: the wrong number of characters; COUNTRY: an unknown or unsupported country code; FORMAT: the right length but the wrong structure; CHECK_DIGIT: the check digit or check characters do not match the rest of the number. |
message | string | The result in a sentence, naming the rule that failed. |
prefix_meaning | string | What the first two digits stand for. |
check_digit | string | The ninth digit. |
expected_check_digit | string | The check digit the first eight digits give. |
Examples
A New York routing number
curl https://api.curatedapi.com/v1/calc/check/us-routing-number \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "021000021"
}'
{
"calculator": "check/us-routing-number@1",
"result": {
"valid": true,
"normalized": "021000021",
"message": "A well-formed routing number (Federal Reserve district 2).",
"prefix_meaning": "Federal Reserve district 2",
"check_digit": "1",
"expected_check_digit": "1"
},
"exactness": {},
"precision": null,
"inputs": {
"number": "021000021"
},
"formula": "3·(d₁ + d₄ + d₇) + 7·(d₂ + d₅ + d₈) + (d₃ + d₆ + d₉) must be a multiple of 10",
"references": [
{
"title": "American Bankers Association: ABA routing number",
"url": "https://www.aba.com/about-us/routing-number"
},
{
"title": "ABA routing transit number: check digit and number ranges",
"url": "https://en.wikipedia.org/wiki/ABA_routing_transit_number"
}
],
"warnings": []
}
One digit wrong
curl https://api.curatedapi.com/v1/calc/check/us-routing-number \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "021000022"
}'
{
"calculator": "check/us-routing-number@1",
"result": {
"valid": false,
"normalized": "021000022",
"problem": "CHECK_DIGIT",
"message": "The last digit is 2, but the first eight digits give 1.",
"prefix_meaning": "Federal Reserve district 2",
"check_digit": "2",
"expected_check_digit": "1"
},
"exactness": {},
"precision": null,
"inputs": {
"number": "021000022"
},
"formula": "3·(d₁ + d₄ + d₇) + 7·(d₂ + d₅ + d₈) + (d₃ + d₆ + d₉) must be a multiple of 10",
"references": [
{
"title": "American Bankers Association: ABA routing number",
"url": "https://www.aba.com/about-us/routing-number"
},
{
"title": "ABA routing transit number: check digit and number ranges",
"url": "https://en.wikipedia.org/wiki/ABA_routing_transit_number"
}
],
"warnings": []
}
References
- American Bankers Association: ABA routing number
- ABA routing transit number: check digit and number ranges
Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.
Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.