KharchaLens

Understand your spending. Protect your privacy.

Python 3.14 MIT License 100% offline

🚀 Get Started on GitHub

What is KharchaLens?

KharchaLens is a privacy-first, offline personal finance analyzer for your HDFC, SBI, and ICICI bank statements (.xls, .xlsx, .pdf). Upload, parse, and get one clear answer: where did my money go?

Everything runs entirely on your computer — no account, no cloud, no tracking. Your statements never leave your device.

📊 Spending Dashboard

Total credit, debit, savings, savings rate, and average monthly spend.

🏪 Merchant Detection

Automatic recognition of Zomato, Swiggy, Amazon, and 100+ merchants.

🧾 Category Breakdown

Lifestyle, investment, insurance, transfers, cash withdrawals, and more.

🔒 Password Support

Handles password-protected PDFs and encrypted Excel statements.

How it works

  1. Upload your HDFC, SBI, or ICICI statement — the bank is detected automatically.
  2. Explore the dashboard: monthly spending trend, top merchants, categories, and every transaction.
  3. Add your own merchant rules, or use the bundled 12-month sample statements to see it all instantly.

Try it

No statement handy? Click Try it with a sample statement inside the app and pick an ICICI or HDFC format — the bundled 12-month samples show the full dashboard without uploading anything.

Getting started

git clone https://github.com/aakraj/kharchalens.git
cd kharchalens
uv sync
uv run streamlit run app.py

Supported statements

Bank.xls / .xlsx.pdf
HDFC
SBI
ICICI

⚠️ Prefer Excel (.xls/.xlsx) — PDFs can give unexpected results for unusual layouts.

Features in detail

KharchaLens turns a raw bank statement into a clear picture of your finances. Once a statement is parsed, the app works entirely on the resulting transactions — no data ever leaves your machine.

Why privacy-first offline analytics?

Bank statements contain sensitive data — account numbers, salaries, every merchant you pay. Most expense trackers upload these files to cloud servers for processing. KharchaLens is built to work the opposite way: the parser runs locally, the dashboard renders locally, and your statements are never uploaded anywhere. If you want the insights without handing your financial history to a third party, KharchaLens is the tool for you.

Frequently asked questions

Which banks can KharchaLens read statements from?

HDFC, SBI, and ICICI e-statements in .xls, .xlsx, or .pdf. The bank is detected automatically from the file content.

Does KharchaLens upload my bank statement anywhere?

No. KharchaLens is 100% offline — statements are parsed entirely on your own computer. There is no account, no cloud, and no tracking.

Can I use password-protected statements?

Yes. Password-protected PDFs and encrypted Excel workbooks are supported. Enter the password in the Statement Password field; it stays in memory only for the parsing session.

What spending insights does the dashboard show?

Total credit, total debit, savings and savings rate, average monthly spend, a monthly spending trend, automatic merchant detection, category breakdowns, and a searchable list of every transaction.

How do I add my own merchant rules?

Flip on Developer Mode, open the review screen for unknown spending, and choose Add new merchant. Rules are saved as YAML — either to your personal local_data/merchants.local.yml or the shared kharchalens/config/merchants.yml.

What if I don't have a statement handy?

KharchaLens bundles 12-month sample statements in ICICI and HDFC format. Click Try it with a sample statement to explore the full dashboard without uploading anything.

Which file format works best?

Excel (.xls or .xlsx) is recommended. PDF parsing handles common layouts, but unusual or scanned PDFs can give unexpected results.