A live payroll system I worked on had a record that said CITIBANK N.A. The employee banked at CITY BANK PLC. Two different banks, four characters apart, and nothing on screen looked wrong. The same system let 96 "branches" be chosen as salary destinations that were not branches at all.
Every payroll, HR and fintech product in Bangladesh rebuilds the same bank and branch routing table, and the public copies are unsourced. One of them files Commercial Bank of Ceylon under The City Bank's prefix. A wrong row doesn't fail loudly. It pays a real account that belongs to someone else.
So I built one with receipts: 63 institutions, 11,426 branches, every bank traced to the page it was read from and the date it was checked. It's open source, with the same validator in Python and JavaScript.
A routing number is not an opaque token
A Bangladesh routing number is nine digits, and each part means something:
225150135 └─┬─┘└┬┘└┬┘│ │ │ │ └── check digit │ │ └──── branch │ └─────── district (15 = Chattogram) └─────────── bank (225 = City Bank PLC) That changes what "validate" means. The first three digits are the bank, so a routing number can be checked against the bank name stored beside it. That's the check that would've caught CITIBANK N.A.
Why not a scraper
My first instinct was the obvious one: crawl the banks' branch pages, regex out the nine-digit numbers, done. Four things showed me why that's dangerous here.
- Plausible and wrong. I ran a page-wide regex over one bank and got 251 branch-routing pairs. The count looked right and the format looked right. Every one paired a branch with the wrong number.
- Bengali numerals. One bank publishes its routing numbers in Bengali digits (০১২৩ and so on). An ASCII digit scan finds zero of them, and the bank looks like it publishes nothing at all.
- Phone numbers look like routing numbers. A branch's mobile number gives you a perfectly valid-looking
015prefix. - A bank's own site can be incomplete. One bank lists 70 branches on its site and operates 147. If I'd trusted the page, real branches would've vanished from the data.
The common thread: every invariant you can write checks the rows that are present. Nothing tells you about the rows that are missing, or the rows that are confidently wrong.
What I built instead
Capture files, not a crawler. I keep one plain-text capture file per bank, and each one carries its source URL and the date I checked it. A build script regenerates the JSON from those files, so the sources stay the source of truth, and a correction is a one-line change anyone can review.
Every mistake became a build-time invariant. Two banks can't claim the same routing number. The district count can't exceed Bangladesh's 64. A district code that resolves to two different districts fails the build outright.
Districts are derived, not stored. I derive the district from digits 4-5, and that holds across all 11,426 rows, so the dataset shows the structure instead of just restating it.
A second source, used carefully. I read 31 banks from their own websites and 32 from the consolidated BACH routing table (26 June 2025). Checked against that table, 99.4% of numbers agree and none contradict it. I used it only to add and confirm, never as proof that a branch doesn't exist.
Unknown stays unknown. Where the evidence ran out, I left the row out and wrote down why. There are 11 branches a bank lists without a routing number, one where a bank prints another bank's prefix, and one routing number no source can name. Guessing a plausible number is exactly the bug this project exists to prevent.
Things that look like branches
The official table contains entries such as TRUNCATION POINT, RTGS, CLEARING HOUSE, AGENT BANKING and CARD DIVISION. In a dropdown they look like any other branch, but you can't pay a salary into any of them. Bangladesh Bank's clearing points and the Controller General of Accounts' ministry units have real routing numbers too, and nobody holds an account at either. The validator flags every one of them and says why.
It also handles renamed and lookalike banks. The Farmers Bank is now Padma Bank, so either name resolves. City Bank, Citibank and Citizens Bank are three different banks.
Tests from real failures
There are 60 tests across the two packages. I wrote each one after a failure that actually happened, not to push a coverage number up. The Python and JavaScript packages read one canonical JSON, so the two languages can't drift apart in behaviour.
pip install bd-bank-routing npm install bd-bank-routing import bdbanks bdbanks.lookup("225150135") # City Bank PLC, Agrabad Branch, Chattogram bdbanks.check("225150135", bank_name="Citibank N.A").problems import { lookup, check } from "bd-bank-routing"; check("225150135", "Citibank N.A").ok; // false Use it, and tell me where it's wrong
The code is MIT and the data is CC0, so any payroll, fintech or HR product can use it without asking me.
- Check or find a routing number: https://shohel.bro.bd/routing-number
- Source and data: https://github.com/MdHRShohel/bd-bank-routing
- The full case study: https://shohel.bro.bd/projects/bd-bank-routing
Banks open, close and rename branches, so it's a dated snapshot, not a promise of freshness. If a branch is missing or wrong, open an issue with the bank's own page and I'll fix it. It's usually one line.


