Historic account statement (kontoutdrag in Swedish) from Swedbank (Swedish bank) are delivered in PDF format. The pdftotext tool are used to extract text from PDF and this tool parses the text and extracts the transactions, and then output a CSV file using the same format as if you would export to CSV in the online bank UI, e.g.
Radnummer,Clearingnummer,Kontonummer,Produkt,Valuta,Bokföringsdag,Transaktionsdag,Valutadag,Referens,Beskrivning,Belopp,Bokfört saldo
1,12345,0123456789,"Konto",SEK,2025-10-31,2025-10-31,2025-10-30,"123456789","Överföring via internet",-1000.00,3000.00
2,67890,9876543210,"Konto",SEK,2025-10-31,2025-10-31,2025-10-30,"987654321","Överföring via internet",-2000.00,1000.00
- Install
pdftotext
MacOS, e.g.
brew install poppler- Install tool
go install github.com/marefr/swedbank-accstmt-parserswedbank-accstmt-parser
Usage: swedbank-accstmt-parser [options] <file1> <file2> ...
-include-account-balances
Include opening/closing balance entries in the output- Extract text from PDF to a text file:
pdftotext -layout <file1>.pdf <file1>.txt
pdftotext -layout <file2>.pdf <file2>.txt- Parse and convert text to CSV
swedbank-accstmt-parser <file1>.txt
swedbank-accstmt-parser <file2>.txt
swedbank-accstmt-parser <file1>.txt <file2>.txtYou can also pipe the text content from pdftotext as input to swedbank-accstmt-parser:
pdftotext -layout <file1>.pdf - | swedbank-accstmt-parserThis project is an independent work and has no affiliation, association, authorization, or endorsement from Swedbank AB or any of its subsidiaries. All trademarks, service marks, and company names mentioned herein are the property of their respective owners.
Use this at your own risk. I have successfully extracted transactions from account statements created between 2015 and 2025, but this was a quick and hacky approach and may include unexpected bugs depending on your input/account statements.
For example, one of my account statement PDF's was encoded in UTF-32BE and included characters that pdftotext couldn't encode to UTF-8, hency why this tool currently replaces all replacement characters with comma (,) as that seemed to make sense in my data.