BankStatementToExcel.com
Data & ERP workflows

Convert a bank statement to JSON for data workflows

Understand the statement object, read its transactions in Python, and handle null values and validation results correctly.

Updated 4 min read

Use JSON when you need transaction data in a script or data pipeline while retaining the statement's account metadata. Our JSON download is one object containing metadata and a transactions array. It is not a bare list of rows or a line-delimited JSON file.

Download the structured statement

  1. Open the PDF to JSON tool and upload a readable, unlocked PDF of up to 25 MB.
  2. Select Convert My Statement and wait for processing.
  3. Open More formats, then select JSON under Spreadsheet+.
  4. Save the file and compare a sample of its dates and amounts with the original PDF.

This guide covers reading a downloaded file. A JSON export does not itself establish a public API integration or an automated upload workflow.

Understand the object structure

Understand the object structure
FieldShapeMeaning
bankName, accountHolder, accountNumberString or nullExtracted account metadata
currencyString or nullStatement-level currency
statementPeriodObject with from and toDate strings or null for each boundary
openingBalance, closingBalanceNumber or nullExtracted statement balances
transactionsArrayRows containing date, description, debit, credit, balance
pageCountNumberPDF page count recorded during conversion
validatedBooleanResult of the application's balance check
parserUsedStringExtraction provider identifier

Within each transaction, date and description are strings; debit, credit, and balance are numbers or null. The parser is asked for ISO dates, but your integration should still validate them. Account numbers are identifiers: keep them as strings so leading zeros are preserved. There is no category or original bank transaction ID field in this export.

Read the transaction array in Python

Save your download as statement.json for this example. Python's json module reads the outer object; select its transactions field to get the rows. Using Decimal for fractional numbers avoids adding binary floating-point rounding during your own calculations. See the Python JSON documentation for json.load and parse_float.

python

import json
from decimal import Decimal
with open("statement.json", encoding="utf-8") as source:
    statement = json.load(source, parse_float=Decimal)
rows = statement["transactions"]
if not isinstance(rows, list):
    raise ValueError("Expected a transactions array")
print("Balance check:", statement["validated"])
for row in rows:
    print(row["date"], row["description"], row["debit"], row["credit"])

The example reads and displays data; it does not post transactions anywhere. If you later use a dataframe, build it from the transaction array and store statement metadata separately. Reading the whole object as though it were a flat transaction table mixes fields with different shapes.

Interpret null and validated carefully

Null means a value was absent or unavailable. It is not interchangeable with zero. A missing debit is normal for a credit row, but a missing opening balance needs a different decision. Check these cases explicitly before totals or imports.

The validated flag checks that there are transactions and both statement balances, then compares opening balance plus credits minus debits with closing balance within a tolerance of 0.01. It does not verify every description, date, account identifier, or running balance. A false value can mean missing balances or a mismatch; a true value is not proof that every row is correct.

Prepare data for a repeatable workflow

Check expected keys and types, date validity, statement currency, and the account before loading rows. Keep a source-file reference with imported records. The export has no persistent bank-issued row IDs, so design your own duplicate review instead of assuming row order is unique across files.

For categories, download the separate categorised workbook. For a simpler flat file, follow the CSV guide.

Published . Updated October 8, 2026 to reflect the current converter and the provider guidance linked in this article.

Prepared with AI assistance and checked against the application's export formats. These are product instructions, not a substitute for checking your records. Tell us about a correction.

Ready to work with your statement?

Convert a PDF, then check the result with your original.

Open JSON converter