Multi-Bank Statement Analyzer – Privacy-First, AI-Assisted Analysis of Bank Statements.
AI Tool Basics for CA

Multi-Bank Statement Analyzer – Privacy-First, AI-Assisted Analysis of Bank Statements.

Author : CA Sarthak Ohri

Watch on Youtube

1. Executive Summary

Bank Statement Analyzer is a desktop tool for Chartered Accountants that turns a client's bank statements into a reconciled, categorised, ITR-ready Excel workbook. It reads text PDFs, scanned PDFs, password-protected PDFs, CSV and Excel files, checks every statement against its balances, and categorises each transaction for income-tax purposes: income or not income, self-transfers, family transfers, salary, loans that square off, business turnover and more.

It is built on one principle: AI suggests, the CA decides. Deterministic rules do the categorising first. Only the rows no rule can place are sent to an optional AI model for a suggested category, and only as a masked description: never amounts, balances, dates, account numbers, the bank's name or the client's name. The statements themselves never leave the CA's computer. Every AI suggestion is shown for the CA to confirm, and every request sent to the AI is recorded and can be exported as an Excel privacy report.

2. Problem Statement

Every ITR season, a practising CA receives bank statements from each client: several banks, several accounts, and a different layout from every bank. For each client, the CA or their staff must:

  1. Convert the statements into usable data. Statements arrive as text PDFs, scanned copies, password-protected files, CSV or Excel. Rows are copied or retyped into Excel.
  2. Check that nothing is missing. The rows must add up to the bank's opening and closing balances, especially where OCR or copy-paste is involved.
  3. Work out what each transaction is. Narrations such as UPI/…, NEFT-… or IMPS/P2A/… do not say whether a credit is salary, a business receipt, a loan being returned, a transfer from the client's own account, or a gift from a family member, all of which are treated differently in the return.
  4. Match transfers between the client's own accounts, so the same money is not counted twice as income.
  5. Identify unexplained credits and large or unusual items that need the client's explanation before filing.

This work is repetitive, slow and error-prone, and a missed or wrongly treated credit creates tax exposure for the client and professional exposure for the CA. At the same time, a client's bank statement is among the most confidential documents a CA holds: it cannot be uploaded to online converters or pasted into public AI chatbots.

3. Solution – Multi Bank Statement Analyzer

Multi Bank Statement Analyzer is a purpose-built tool that automates the complete workflow from bank statement to reviewed analysis. It runs entirely on the CA's Windows computer: extract a zip, double-click run.bat, and it opens in the browser. There is no installation, no server and no cloud account.

Core features

  1. Reads every common format – text PDFs, scanned / image-only PDFs (built-in OCR, nothing extra to install), password-protected PDFs, CSV and Excel. About 15 Indian bank layouts are covered by automated tests, including SBI, HDFC, ICICI, Kotak, Bank of Baroda, Bank of India, Canara, IDBI, Yes Bank, DBS, Union Bank, Punjab & Sind Bank and Indian Bank.
  2. Balance-anchored reading and reconciliation – every row's balance must follow from the previous balance; each statement is checked so that opening balance + credits − debits = closing balance, and against the bank's printed totals where shown. A figure misread by OCR shows up as a mismatch instead of being hidden.
  3. ITR-oriented categorisation – credits are grouped as Income, Not income or To be explained; debits by spending type. The tool recognises self-transfers (by the holder's name), family members, salary from the employer and monthly pattern, and square-offs (temporary loans given and returned), and gives a business-turnover view for business clients. Unknown rows are marked "Unidentified" – never guessed.
  4. Counterparty extraction – the party's name is read out of the narration using bank-specific layouts (HDFC, Kotak, ICICI, SBI, UCO and others) and a general rule, and a counterparty ledger is built.
  5. Multi-bank merge – several accounts of the same client are analysed together, with transfers between the client's own accounts matched, and every view available consolidated or bank by bank.
  6. AI category suggestions (optional) – rows the rules cannot place are sent, masked, to LLM using API key for a suggested category, party and reason. Suggestions are shown separately for the CA to accept or change.
  7. Working dashboard – tabs for Overview, Transactions, AI suggestions, Needs a category, Flags & checks, Credits, Debits, Counterparties, Recurring, Large items, Square-offs, Turnover and Month-wise. The CA can set a category for one row, a whole party or many groups at once, rename parties, confirm salary and loans, and add notes; every figure updates.
  8. Client memory – each client's profile, own rules, party names and decisions are kept on the PC. Next year, the CA picks the client and uploads the new statements; everything applies again.
  9. Excel report – a complete workbook (dashboard, all transactions, credits and debits by category, counterparty ledger, flags and checks, large transactions, recurring payments, square-offs, cross-account matches, business turnover, month-wise), consolidated or one per bank.
  10. AI privacy report – an Excel record, per analysis, of exactly what was sent to the AI for each row, what came back, and why any row was not sent.

Result: the CA's time moves from retyping and first-pass tagging to reviewing and judgement, with every statement reconciled and every AI request auditable.

4. How It Works – Architecture

The tool is a local web application. A Python program runs on the CA's PC and does all the work; the browser is only the screen.

Statements (PDF / scanned PDF / password PDF / CSV / Excel)

       │

 1. Read       pdfplumber · RapidOCR (scans) · pypdf (passwords) · pandas

       │

 2. Reconcile  balance-anchored rows; opening + credits − debits = closing

       │

 3. Categorise client rules → rules for all clients → holder (self)

                → family → 81 built-in rules → salary → square-offs

       │

 4. AI (optional, only for rows still Unidentified)

                mask → final check → Claude → suggestion to confirm

       │

 5. Review     dashboard: confirm, correct, add rules – every figure updates

       │

 6. Export     Excel workbook · AI privacy report

Computation hierarchy. Deterministic code does all reading, arithmetic and reconciliation. Rules are applied in a fixed order (first match wins). The AI is the last step, for what remains, and its output is a suggestion only.

5. Use of Artificial Intelligence

Where AI is used

  1. Category suggestions for rows that no rule can place. The AI receives the masked description, whether it is a credit or a debit, and the client type (salaried / business / other), and must answer from the tool's fixed list of categories in a structured (JSON schema) format, with a party name, reason and confidence.
  2. Unknown bank layouts (optional) – an unfamiliar statement format can be detected by AI from its masked column headers only.
  3. Development – Claude (Anthropic) was used as the development co-pilot throughout the build: design, parsing logic, interface, tests and debugging.

Design principles

  1. AI suggests, the CA decides. Suggestions appear under "AI suggestions" for confirmation; any choice the CA sets by hand always wins.
  2. Rules first, AI last. The AI never sees rows the rules have already placed, and it never computes or changes any amount.
  3. Unknown is "Unidentified", never a guess. If neither rules nor AI can place a row, it waits for the CA.
  4. Context without identity. The AI is told only the client type, so that, for example, a salaried client is never given "Business Receipts".
  5. Efficient and resilient. Identical masked descriptions are sent once, in batches of 40 with 4 requests at a time; answers are stored on the PC. The dashboard opens before the AI finishes; if the AI service fails, the analysis is unaffected.
  6. Optional. AI can be switched off for one client or for all clients. Everything else works fully offline.

6. Privacy, Security and Confidentiality

The statements are read, analysed and stored only on the CA's PC. When AI is on, only a masked description of the rows the rules could not place leaves the PC.

Sent to the AINever sent

Masked description of the transactionCredit or debitClient type (salaried / business / other)Amounts and balancesTransaction dates – and every digit in the descriptionAccount, phone, cheque and reference numbersUPI IDs and e-mail addresses, PAN, IFSCThe client's and family members' namesThe bank's name; the statement file


Example – actual output of the tool's masking on made-up data (client: SUNIL VERMA):


On the PC: UPI/SHARMA KIRANA STORE/sharmakirana9@okbank/412345678901/Groceries 12 Oct

Sent to AI: UPI/SHARMA KIRANA STORE/[UPI-ID]/#/Groceries # Oct

Safeguards

  1. Redaction – every digit is deleted; UPI IDs and e-mails become [UPI-ID], PAN becomes [PAN], IFSC becomes [IFSC]; the client's name is caught in many forms (each distinctive word, written together, misspelt, broken by OCR, with an initial attached) and replaced by [CLIENT]; family members' names by [FAMILY].
  2. Final check (fails closed) – just before sending, a description that still contains a digit, an @, a PAN or IFSC pattern or the client's name is not sent at all.
  3. Strict mode – unticking Settings → "Names of individuals" sends only rows that look like a business; rows naming a person stay on the PC.
  4. Full record – every request is recorded on the PC exactly as it was sent (Settings → "See exactly what was sent to the AI"), downloadable as Excel, plus the per-analysis AI privacy report.
  5. Proof by test – an automated test captures the actual HTTP request produced by the Anthropic library on made-up data and fails if any amount, date, digit, identifier or the client's name is in it. A separate audit of the masking over 24 real statements (1,262 descriptions) found no digits, dates, UPI IDs, IFSC codes, PAN fragments or client names left.
  6. No readable cache – stored AI answers are keyed by a fingerprint (SHA-1), not by the description text.
  7. Local only – the server is reachable only from the same PC (127.0.0.1); client data is kept in the Windows user's own folder; the CA's API key is shown only as dots; password-protected statements are unlocked on the PC and the password is never sent anywhere.
  8. Transparent disclaimer – the start page lists exactly what is sent to the AI, and is shown again whenever that changes.

7. Tools and Technologies Used

TechnologyRole in Bank Statement Analyzer

Python 3.13 (embedded)The whole application; shipped inside the Windows zip, so nothing needs to be installed
FastAPI + uvicornLocal web application and server on 127.0.0.1; the browser is the user interface
Jinja2, HTML / CSS / JavaScriptStart page, working dashboard, rules and settings pages
pdfplumber (pdfminer.six)Reads text PDFs with word positions, so columns can be rebuilt for any bank layout
RapidOCR (ONNX Runtime, OpenCV) + pypdfium2Built-in, offline OCR for scanned and image-only PDFs – no Tesseract to install
pypdfOpens password-protected PDFs with the password typed by the CA
pandasReads statements supplied as CSV or Excel
openpyxlWrites the Excel analysis workbook and the AI privacy report
Anthropic Claude (official Python library)Optional AI category suggestions on masked descriptions, with structured JSON output; also the development co-pilot for the build
cryptographyProduct-key (licence) signature checks
pytestAbout 220 automated tests, including the AI privacy tests and bank-layout tests

8. Implementation Plan

Bank Statement Analyzer is a working product, released in batches to tester CAs, with fixes driven by their feedback (issues are logged with made-up data only).

Phase 1 – Reading engine (completed)

  1. Balance-anchored universal parser for text PDFs; bank-specific party-name layouts
  2. Built-in OCR for scanned PDFs (made about 2× faster in v4.11); password-protected PDFs; CSV and Excel
  3. Reconciliation of every statement; multi-account merge with inter-account matching

Phase 2 – Analysis and review (completed)

  1. ITR-oriented categories, self / family transfers, salary, square-offs, business turnover
  2. Working dashboard with bank switcher and edits that update every figure (v4.9)
  3. Client database on the PC: profile, client rules, party names, saved analyses
  4. Search, sort and bulk categorisation; client rules; searchable list of built-in rules (v4.13)

Phase 3 – AI with privacy (completed)

  1. AI category suggestions with confirmation workflow (v4.10–v4.12)
  2. Stronger redaction, final check, strict mode and record of every request (v4.14)
  3. AI privacy report in Excel per analysis (v4.15)

9. Deployment and Instructions

Deployment is deliberately simple: a single zip, no installer, no admin rights and no internet needed (except for the optional AI).

  1. Extract the zip to a folder on a Windows PC.
  2. Double-click run.bat. The tool starts and opens in the default browser at http://localhost:8000.
  3. Optional: in Settings, add an Anthropic API key to turn on AI suggestions (it can be tested with a made-up request).
  4. On the start page, create or pick a client (salaried / business / other), upload the statements, and type passwords if asked.
  5. Review the dashboard: confirm or change AI suggestions, categorise the rows that need a category, keep choices as client rules.
  6. Download the Excel workbook – consolidated or per bank – and, if needed, the AI privacy report.

A free trial allows 3 analyses; product keys are issued for continued use.

10. Target Users and Benefits

Target users

Practising Chartered Accountants and their staff preparing income-tax returns for salaried, business and other clients; also useful for any review of bank statements (loan files, assessments, internal checks).

Benefits

  1. Time – removes retyping and first-pass categorisation; the CA's time goes to review and judgement.
  2. Accuracy – every statement reconciled to its balances; transfers between own accounts matched so income is not double-counted; unknown rows flagged, never guessed.
  3. Consistency year on year – client rules and decisions are remembered and applied again next year.
  4. Confidentiality – statements never leave the PC; AI sees only masked text; every AI request is on record.
  5. Zero IT overhead – runs on any ordinary Windows PC, offline, with nothing to install.
  6. Explainable output – every row shows why it got its category (rule, client rule, AI suggestion or set by the CA).