United States Banking Institution Account Number Regular Expression?

Solution 1:

There is no standard for US banks' account numbers.

IBAN is not used in the US.

There is a limit for ACH transactions (4-17 digits), but not all transactions have to be ACH.

And yes, the US banking system is antiquated.

I'm looking at a DW (Data Warehouse) of 38 different systems at a bank and the length of account varies widely depending on the product. Several of the systems have alphabetic characters in the account numbers. This is probably irrelevant since they are special types of customer accounts like brokerage accounts and other things which aren't accessible through ACH - you need to specify what kind of account you're interested in. If you restrict yourself to accounts which you can get to through ACH, you can simply restrict to numeric digits.

You can get a lot more information about ACH at: http://www.nacha.org/

Solution 2:

Good luck with that, because you can't.

Banks are free to use just about anything as an account number. I think the only validation you can do is whether or not they're numeric (as they all are).

The most common length for bank account numbers is 9, 12, or 10 digits. Although they range from 4 to 17 digits long. I have a large database of valid numbers and there's no pattern that I can see to the "account number".

A "routing number" defines the bank (pretty much) but even within a particular routing number, the account numbers can be of different lengths.

This is why payroll services often require an extra day (or two) before initiating Direct Deposit in order to "prenote" the account (validate it by performing a no-op ACH transaction) because you really can't verify it otherwise.