How to extract data from bank statements with OCR and AI
To extract data from a bank statement, OCR first turns the page into text (essential for scans and photos), then AI works out what that text means — which lines are transactions, which column is money in and which is money out, where one statement ends and the next begins. The step most tools skip is the one that matters: checking the result against the statement’s own running balance, which proves that nothing was missed or misread.
OCR and AI: what each part does
OCR (optical character recognition) reads characters from an image. On a digital PDF the text is already there; on a scan or phone photo, OCR is what recovers it. On its own, OCR gives you text in roughly the right places — not a table you can use.
AI turns that text into data. It recognises a transaction line among headers, footers and adverts; joins a description that wraps onto a second line; tells money in from money out when the statement uses one column with signs, or two columns, or a “CR” suffix; and copes with every bank’s layout without a template for each.
Why the running balance is the real test
Every UK bank statement prints a running balance. Starting from the opening balance, each transaction should move the balance to exactly the figure printed beside it. That makes the balance a built-in checksum:
- a missed transaction leaves a gap the next balance cannot bridge;
- a debit read as a credit puts the balance out by twice the amount;
- a misread figure (an 8 read as a 3) shows up on the very line where it happened.
A tool that walks the balances can tell you not just that something is wrong but where. Caelum does this for every statement, and also checks the printed total money in and out where the statement has them.
The steps, end to end
- Gather the statements — PDFs from online banking, scans, or photos. A year in one PDF is fine.
- Read the pages: OCR for images and scans, the embedded text for digital PDFs. Sideways pages are turned upright first.
- Find each statement in the file, and each transaction on each page, including those split across a page break.
- Structure each transaction: date, description, reference, money in, money out, balance.
- Prove it: walk the balances from opening to closing; check the printed totals.
- Export to Excel, CSV or JSON, or straight into your own software through an API.
What to look for in a tool
- It checks, not just reads. Ask what happens when a statement does not add up — does the tool tell you, and where?
- Multi-statement PDFs split into their statements, not merged into one long table.
- Scans and photos handled, not just digital PDFs.
- The same columns for every bank, so your import mapping never changes.
- Where the data is kept — for client data, UK hosting and encryption matter.
Frequently asked questions
Is OCR alone enough? For text, sometimes. For accounting data, no: OCR does not know a balance from a reference number, and it cannot tell you when it has misread one.
How accurate is AI extraction? Accurate enough to be useful only if it is checked. A statement whose transactions reach every printed balance is right to the penny; one that does not is flagged for a look.
Can I try it on my own statements? Yes — new Caelum accounts get free credits. See bank statement PDF to Excel.