bankstatementparser v0.0.11 · live
Core parser
CAMT, PAIN.001, MT940, OFX/QFX, CSV and PDF into the unified Transaction model, with the deterministic-then-LLM pipeline.
Bank statements · CAMT · MT940/942 · BAI2 · OFX · CSV · PDF
bankstatementparser is an open-source Python toolkit that turns CAMT, PAIN.001, MT940/MT942, BAI2, OFX/QFX, CSV — and PDFs, digital or scanned — into a single auditable Transaction model. Structured files take the deterministic path; PDFs fall through to a local model. Nothing leaves your machine unless you opt in.
Transaction model, whatever the bank sendsReconciliation breaks when every bank, rail and legacy system speaks a different dialect — ISO 20022 CAMT here, a SWIFT MT940 there, a BAI2 cash-management file, an OFX export, a CSV dump, or a PDF someone scanned on a photocopier. bankstatementparser normalises all of them into one typed, auditable record set, so your downstream code is written once.
CAMT, PAIN.001, MT940/MT942, BAI2, OFX/QFX and CSV are parsed by explicit rules — repeatable, testable, and auditable line by line.
PDFs fall through to a configurable local LLM (Ollama) and a local vision model for scans. Your statements only reach an external provider if you explicitly wire one up.
Every statement collapses to the same Transaction shape — dates, amounts, counterparties, references — ready for reconciliation, ledgers or export to Excel.
Start with the core parser; add loaders, a writer, and agent/editor integrations as you need them. Every package is Apache-2.0 and on PyPI.
bankstatementparser v0.0.11 · live
CAMT, PAIN.001, MT940, OFX/QFX, CSV and PDF into the unified Transaction model, with the deterministic-then-LLM pipeline.
bankstatementparser-loader-bai2 v0.0.14 · live
Parse BAI2 cash-management and lockbox files straight into the core Transaction model.
bankstatementparser-loader-mt942 v0.0.14 · live
SWIFT MT942 interim transaction reports, loaded into the same model as everything else.
bankstatementparser-writer-xlsx v0.0.13 · live
Write parsed statements to clean, formatted .xlsx workbooks for analysts and auditors.
bankstatementparser-lsp v0.0.13 · live
A Language Server for editor tooling over statement files and mappings.
bankstatementparser-mcp v0.0.14 · live
Exposes the parser as Model Context Protocol tools so agents (Claude, Cursor, Zed) can read statements safely.
One API across the formats finance teams actually receive — from modern ISO 20022 to a scanned PDF from a regional bank.
| Format | Origin | How it is parsed |
|---|---|---|
| CAMT (ISO 20022) | camt.052/053/054 | Deterministic XML parsing. |
| PAIN.001 | ISO 20022 initiation | Deterministic XML parsing. |
| MT940 / MT942 | SWIFT | Deterministic field parsing (MT942 via the loader). |
| BAI2 | US cash management | Deterministic parsing via the BAI2 loader. |
| OFX / QFX | Open Financial Exchange | Deterministic parsing. |
| CSV | Bank exports | Configurable column mapping. |
| Digital & scanned | Local LLM, then a vision model for scans. |
Consolidate balances and transactions from every bank into one model — no more a spreadsheet per format.
Auditable, on-device extraction with a clear trail — sensitive statements never leave your infrastructure by default.
Ship account aggregation and reconciliation features without building a parser for every bank format yourself.
A typed Python API, composable loaders/writers, and LSP + MCP integrations for editor and agent workflows.
Install from PyPI and turn a CAMT, MT940 or CSV file into a list of transactions in minutes.
pip install bankstatementparser