---
title: "Bank Statement to CSV Converter (Python Script) | MCC"
description: "Convert bank and credit card statements (PDF, CSV, OFX/QFX) into one categorized transactions CSV, with a tie-out to each ending balance."
url: "https://mcc-solutionsnj.com/bookkeeping/bank-statement-converter-python-script"
---

Paid script

# Bank and credit card statements to a clean, categorized CSV

Turn a pile of PDF statements and bank downloads into one transactions file you can import or hand to your bookkeeper. Every statement is tied to its ending balance, so you know nothing was missed.

[![Intuit ProAdvisor Gold tier badge](/img/credentials/intuit-proadvisor-gold.png)](https://proadvisor.intuit.com/app/accountant/search?searchId=matthew-coleman77)Gold tier in Intuit's ProAdvisor program. [See my Intuit listing](https://proadvisor.intuit.com/app/accountant/search?searchId=matthew-coleman77)

Paid script

## Bank Statement Converter

Buy this script on its own for $39, one time. No membership needed. It runs on your own computer and nothing you enter leaves it. Read how it works and the questions below first.

The [Automation Suite](/bookkeeping/automation-suite) includes this and 10 more tools for $99. Members get this included. [See the membership](/membership) or [sign in](/membership/login). Already bought it? Email me my access link.

How it works

## How it works

Point the script at your statements: text-based PDFs, plain-text copies, CSV downloads, or OFX/QFX (Quicken/QuickBooks) files. It finds the transaction lines in common US layouts: **date at the start, amount at the end**, running balances, separate debit and credit columns, negatives in parentheses, and descriptions that wrap onto the next line. It works out money in versus money out, **removes duplicates where statements overlap**, and sorts each line into a category using a keyword rules file you can edit. You get **transactions.csv**, a category summary, a **tie-out table** (beginning balance plus activity versus the stated ending balance), and an **unparsed lines** file listing every line it did not use, so nothing is dropped silently.

FAQ

## About this calculator

**What do I need to run it?**

Python 3.9 or newer on Windows, Mac or Linux. CSV, OFX/QFX and text statements need nothing else. For PDF statements, install the free pypdf package once with pip install pypdf. Run it with --demo first to see sample output.

**Will it read scanned statements?**

Not directly. A scanned or photographed statement is a picture with no text in it. Run it through OCR first (for example the free ocrmypdf tool, or your scanner's searchable PDF option), then use the new PDF. The script tells you when a PDF has no readable text.

**How do I know every transaction was captured?**

Each statement gets a tie-out line: beginning balance plus the transactions it found should equal the statement's ending balance. Any line with an amount that was not read as a transaction is listed first in unparsed_lines.csv, so you can check it.

**Is this tax or accounting advice?**

No. It is a general-information tool that organizes your own records. The category names are suggestions, not tax classifications. Have a qualified professional review your books and returns.

See [all free tools](/free-tools). More free tools: [Are my books ready for taxes?](/bookkeeping/is-my-quickbooks-ready-for-taxes), [Cash flow and burn rate calculator](/bookkeeping/cash-flow-and-burn-rate-calculator), [EBITDA calculator](/bookkeeping/ebitda-calculator), or [see all free tools](/free-tools).

Free

### Month-End Close Checklist (PDF)

The five-day close, one page to print. Enter your email and we send a link to confirm it is yours, then the download. We may email you about new toolkits, and every email has an unsubscribe link.

General information, not tax or legal advice. [How we write and check our tools](/editorial-standards).

## Want your books and numbers handled?

[Free health check](/bookkeeping/health-check)[Call (908) 444-6373](tel:+19084446373)
