A test routing number is a nine-digit ABA number that passes the checks a form or ACH library runs offline — a valid Federal Reserve prefix and the 3-7-1 checksum — paired with a random account number. This generator produces them, along with UK sort codes, Canadian transit and institution numbers, and Australian BSBs, so you can test bank-account forms, payout onboarding and ACH file builders without touching a real account.
How to use it
- Pick a region: United States (ABA + account), United Kingdom (sort code), Canada (transit + institution) or Australia (BSB).
- Set the account number length. Test 6 and 17 as well as the usual 10 to 12.
- Choose an account type — checking, savings or business — if your form branches on it.
- Copy the rows or export them as JSON, CSV or SQL. The seed regenerates the same batch.
What you can control
- US routing numbers with a real Federal Reserve routing symbol in the first two digits and a computed ABA check digit in the ninth.
- Account numbers from 6 to 17 digits.
- UK sort codes in
##-##-##form with eight-digit account numbers. - Canadian five-digit transit and three-digit institution numbers.
- Australian BSBs in
###-###form with nine-digit account numbers. - An optional fictional bank name for display tests.
How the ABA check works
Take 011000015, the routing number of the Federal Reserve Bank of Boston. Multiply each digit by the repeating weights 3, 7, 1:
| Digit | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 5 |
|---|---|---|---|---|---|---|---|---|---|
| Weight | 3 | 7 | 1 | 3 | 7 | 1 | 3 | 7 | 1 |
| Product | 0 | 7 | 1 | 0 | 0 | 0 | 0 | 7 | 5 |
The products add up to 20, a multiple of ten, so the number is valid. Strict validators also check the first two digits: 01–12 are ordinary Federal Reserve districts, 21–32 thrift institutions, 61–72 electronic transactions, and 80 traveller's cheques. A number starting 45 passes the checksum and fails the prefix test, which is why this generator never produces one.
def aba_valid(rtn: str) -> bool:
if len(rtn) != 9 or not rtn.isdigit():
return False
prefix = int(rtn[:2])
if not (0 <= prefix <= 12 or 21 <= prefix <= 32 or 61 <= prefix <= 72 or prefix == 80):
return False
weights = (3, 7, 1) * 3
return sum(int(d) * w for d, w in zip(rtn, weights)) % 10 == 0
Testing ideas
- Leading zeros. Many routing numbers begin with
0. Store one in a numeric column, or parse it withparseInt, and the leading zero disappears. Generate a batch, filter for numbers starting0, and round-trip them through your API. - Account-number length. Submit a 6-digit and a 17-digit account. Forms often cap at 12.
- Confirmation fields. Many payout forms ask for the account number twice. Check that pasting into the second field works and that a mismatch is reported clearly.
- Masking. Confirm that only the last four account digits appear in emails, receipts and logs.
What this is not
These are not live bank details. They pass offline validation and nothing else: a Fed directory lookup rejects most of them, and no transfer to one will settle. Use your payment provider's documented sandbox bank accounts for ACH tests that reach a network.