Bank statements · CAMT · MT940/942 · BAI2 · OFX · CSV · PDF

Every bank statement format, into one clean model.

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.

7+
statement formats, one model
PDF
digital & scanned, on-device
6
composable suite packages
0
data sent out by default

One Transaction model, whatever the bank sends

Reconciliation 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.

Deterministic for structured data

CAMT, PAIN.001, MT940/MT942, BAI2, OFX/QFX and CSV are parsed by explicit rules — repeatable, testable, and auditable line by line.

Private by default

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.

Auditable output

Every statement collapses to the same Transaction shape — dates, amounts, counterparties, references — ready for reconciliation, ledgers or export to Excel.

A composable suite, not a monolith

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

Core parser

CAMT, PAIN.001, MT940, OFX/QFX, CSV and PDF into the unified Transaction model, with the deterministic-then-LLM pipeline.

PyPI · Source

bankstatementparser-loader-bai2 v0.0.14 · live

BAI2 loader

Parse BAI2 cash-management and lockbox files straight into the core Transaction model.

PyPI · Source

bankstatementparser-loader-mt942 v0.0.14 · live

MT942 loader

SWIFT MT942 interim transaction reports, loaded into the same model as everything else.

PyPI · Source

bankstatementparser-writer-xlsx v0.0.13 · live

Excel writer

Write parsed statements to clean, formatted .xlsx workbooks for analysts and auditors.

PyPI · Source

bankstatementparser-lsp v0.0.13 · live

LSP server

A Language Server for editor tooling over statement files and mappings.

PyPI · Source

bankstatementparser-mcp v0.0.14 · live

MCP server

Exposes the parser as Model Context Protocol tools so agents (Claude, Cursor, Zed) can read statements safely.

PyPI · Source

Formats it speaks

One API across the formats finance teams actually receive — from modern ISO 20022 to a scanned PDF from a regional bank.

Statement formats normalised into the unified Transaction model.
FormatOriginHow it is parsed
CAMT (ISO 20022)camt.052/053/054Deterministic XML parsing.
PAIN.001ISO 20022 initiationDeterministic XML parsing.
MT940 / MT942SWIFTDeterministic field parsing (MT942 via the loader).
BAI2US cash managementDeterministic parsing via the BAI2 loader.
OFX / QFXOpen Financial ExchangeDeterministic parsing.
CSVBank exportsConfigurable column mapping.
PDFDigital & scannedLocal LLM, then a vision model for scans.

For the people who reconcile the money

Treasury & finance teams

Consolidate balances and transactions from every bank into one model — no more a spreadsheet per format.

CFOs & controllers

Auditable, on-device extraction with a clear trail — sensitive statements never leave your infrastructure by default.

Fintech founders

Ship account aggregation and reconciliation features without building a parser for every bank format yourself.

Data & platform engineers

A typed Python API, composable loaders/writers, and LSP + MCP integrations for editor and agent workflows.

Parse your first statement in one command

Install from PyPI and turn a CAMT, MT940 or CSV file into a list of transactions in minutes.

pip install bankstatementparser