---
title: "Convert Bank Statements to JSON: Schema and Methods"
description: "How to convert bank statement PDFs and scans to JSON, with a sample schema, the conversion methods compared, and the checks that make the data trustworthy."
url: https://www.docsumo.com/blog/convert-bank-statement-to-json
updated: 2026-09-26
---

# How to convert bank statements to JSON: schema, methods and validation

For developers, fintech product teams and lending operations: what a good bank statement JSON looks like, how to get there from PDFs and scans, and how to validate the output before your app uses it.

[Ritu John](https://www.docsumo.com/blog-authors/ritu-john) · Updated Sep 26, 2026 · 4 min read

![A bank statement PDF being dragged into a "Convert to JSON" window, with JSON output shown alongside](https://www.docsumo.com/blog/images/bank-statement-extraction--data-conversion-to-json-hero.webp)

## Key takeaways

- Converting a **bank statement to JSON** means extracting the header, summary and every transaction from a PDF or scan into a structured, machine-readable object.
- A useful schema has **account details, statement period, opening and closing balances, and a transactions array** with date, description, debit, credit and running balance.
- Methods range from **PDF text parsers** (digital PDFs only, one layout at a time) to **document AI APIs** that handle any bank, scans and multi-page tables.
- Always **validate the JSON**: opening balance plus credits minus debits must equal the closing balance, and each running balance must follow from the previous one.
- Keep **amounts as numbers with a fixed sign convention, dates in ISO 8601** and the source page for every transaction.

To **convert a bank statement to JSON**, extract the account details, statement period, opening and closing balances, and every transaction from the PDF or scan, then write them into a structured JSON object with a transactions array. For digital PDFs from one bank, a PDF parser can work; for statements from many banks, or scans and phone photos, a document AI tool or API is the practical choice. Either way, validate the result: the opening balance plus credits minus debits must equal the closing balance.

**Account**

| Field | Extracted value |
| --- | --- |
| Account holder | Harbor Street Bakery LLC |
| Address | 118 Harbor St, Portland, ME |
| Bank name | First Midwest Bank |
| Account number | •••• 4821 |
| Account type | Business checking |
| Statement period | 2026-07-01 → 2026-07-31 |

**Balances**

| Field | Extracted value |
| --- | --- |
| Opening balance | 42,180.55 |
| Total deposits | 88,412.10 |
| Total withdrawals | 91,686.44 |
| Closing balance | 38,906.21 |
| Transaction count | 142 |

**Transactions**

| Field | Extracted value |
| --- | --- |
| Date | 2026-07-14 |
| Description | ACH DEPOSIT STRIPE PAYOUT |
| Amount | +3,284.10 |
| Debit / credit | Credit |
| Running balance | 51,902.44 |
| Category | Card processor payout |

*The account, balance and transaction fields read here map one to one to the JSON keys in the schema below.*

This guide covers a sample JSON schema, the conversion methods compared, a step-by-step process and the checks that make the output safe to use.

## Why convert bank statements to JSON

- **Apps and APIs speak JSON.** Lending platforms, underwriting models, accounting tools and data pipelines ingest it directly.
- **It keeps the structure.** Account, period, balances and transactions stay together in one object.
- **It's easy to validate.** Balances and running totals can be checked in code before anything downstream uses them.
- **It scales.** Once statements are JSON, analysis and categorization can run automatically.

Typical uses: loan underwriting and income verification, cash flow analysis, bookkeeping and reconciliation, and feeding transaction data to analytics or machine learning models.

## A sample bank statement JSON schema

Field names differ between tools, but a good output has the same parts. This one holds the statement shown above:

```json
{
  "document_type": "bank_statement",
  "bank_name": "First Midwest Bank",
  "account_holder": "Harbor Street Bakery LLC",
  "account_number_last4": "4821",
  "account_type": "business_checking",
  "currency": "USD",
  "period_start": "2026-07-01",
  "period_end": "2026-07-31",
  "opening_balance": 42180.55,
  "closing_balance": 38906.21,
  "total_credits": 88412.10,
  "total_debits": 91686.44,
  "transaction_count": 142,
  "transactions": [
    {
      "date": "2026-07-02",
      "description": "ACH DEPOSIT SQUARE INC",
      "debit": null,
      "credit": 4812.30,
      "balance": 46992.85,
      "category": "card_processor_payout",
      "page": 1
    },
    {
      "date": "2026-07-05",
      "description": "PAYROLL GUSTO",
      "debit": 6420.00,
      "credit": null,
      "balance": 40572.85,
      "category": "payroll",
      "page": 1
    }
  ]
}
```

Design choices that save trouble later:

- **Numbers, not strings,** for amounts and balances, with separate debit and credit fields or one signed amount, never both.
- **ISO 8601 dates** (YYYY-MM-DD), because statements print dates in many formats.
- **Masked account numbers** unless you truly need the full number.
- **Page reference** for each transaction, so a reviewer can find it on the source.
- **Confidence scores** per field if your tool provides them.

**Video**: [Bank statement extraction using Docsumo AI \[A Quick Guide\]](https://www.youtube.com/watch?v=9tTcNZGCcrE)

## Conversion methods compared

| Method | Works on | Strengths | Limits |
| --- | --- | --- | --- |
| Manual entry into a spreadsheet, then export | Anything | No tools needed | Slow and error-prone; not repeatable |
| PDF text parser (for example, a script with a PDF library) | Digital, text-based PDFs | Free, fully under your control | Breaks on scans; a new parser per bank layout; tables that wrap or span pages are hard |
| Template OCR tool | Scans and PDFs with fixed layouts | Handles scans | A template per bank and statement version |
| Document AI API | Any bank, digital or scanned, multi-page | Handles new layouts, returns JSON with confidence scores | Needs vendor due diligence on accuracy and security |

For a handful of statements from one bank, a parser is fine. For a lending or fintech product that receives statements from hundreds of banks, a document AI API is the practical approach.

> **Docsumo for bank statements & lending**: [Bank statement extraction](https://www.docsumo.com/solutions/documents/bank-statements)
>
> Every transaction, balance and account holder field, read from PDFs and scans, with running balances checked.

## How to convert bank statements to JSON with document AI

1. **Send the file**: Upload the PDF or image in the web app, email it to the tool's inbox, or post it to the API. Good tools split multi-account and multi-month files.
2. **Extract**: OCR and layout models find the header, summary and transaction table, joining tables that run across pages. Docsumo's [bank statement extraction](https://www.docsumo.com/solutions/documents/bank-statements) has 99% field-level accuracy across 250+ document types.
3. **Review low-confidence values**: A reviewer sees each uncertain field highlighted on the page and corrects it.
4. **Validate**: Run the balance checks below automatically; Docsumo checks the running balances.
5. **Receive JSON**: Fetch it from the API, or receive it by [webhook](https://www.docsumo.com/integrations) when processing finishes, then load it into your app or data store.

Docsumo's free trial covers 14 days and up to 1,000 pages, with API and webhook access; see [pricing](https://www.docsumo.com/pricing).

## Validate the JSON before you use it

These checks catch misread values, dropped rows and statements that don't add up:

- **Balance reconciliation:** opening_balance + total_credits − total_debits = closing_balance.
- **Running balance chain:** each transaction's balance = previous balance + credit − debit.
- **Totals:** the sum of transaction credits and debits equals the statement's summary totals.
- **Dates:** every transaction date falls within the statement period, in order.
- **Continuity:** each month's opening balance equals the prior month's closing balance.

A simple check in Python:

```python
from decimal import Decimal

def reconciles(stmt):
    bal = Decimal(str(stmt["opening_balance"]))
    for t in stmt["transactions"]:
        bal += Decimal(str(t["credit"] or 0)) - Decimal(str(t["debit"] or 0))
        if t.get("balance") is not None and bal != Decimal(str(t["balance"])):
            return False
    return bal == Decimal(str(stmt["closing_balance"]))
```

Failures point to a misread value, a missing transaction or an altered statement. See [how to spot fake bank statements](https://www.docsumo.com/blog/how-to-spot-fake-bank-statements).

## Storing and securing bank statement JSON

- **Encrypt at rest and in transit,** and restrict access by role.
- **Keep the source file** linked to the JSON for audit and disputes.
- **Set retention rules** so data isn't kept longer than your policy allows.
- **Choose vendors carefully.** Docsumo is [SOC 2 Type 2, HIPAA and GDPR](https://www.docsumo.com/security) compliant.

To go further than conversion, read [AI bank statement analysis](https://www.docsumo.com/blog/ai-bank-statement-analysis) or [how to convert bank statements to Excel](https://www.docsumo.com/blog/convert-bank-statement-pdf-to-excel).

## The bottom line

Bank statement JSON is only as good as the extraction and checks behind it. Use a clear schema with numeric amounts and ISO dates, pick a method that handles the banks and scans you actually receive, and reconcile every statement before your app trusts it.

[Book a demo](https://www.docsumo.com/book-a-demo) with a few of your own statements, or [start a free trial](https://www.docsumo.com/free-trial).

## Frequently asked questions

### How do I convert a bank statement PDF to JSON?

Send the PDF to a document AI tool or API that extracts bank statements. It returns the account details, balances and transactions as JSON, or lets you download JSON from its interface. Validate the balances before using the data.

### Can I convert scanned bank statements to JSON?

Yes, but you need OCR. Text-based PDF parsers can't read scans. Document AI tools apply OCR and layout models and return a confidence score per value so you can review uncertain fields.

### Why use JSON instead of Excel or CSV?

JSON keeps the nested structure (account, periods, transactions) in one object and is the native format for web apps and APIs. CSV and Excel are better for people reviewing data in a spreadsheet. Most tools export all three.

### How should amounts be represented in bank statement JSON?

As numbers, not strings, with a clear sign convention, either separate debit and credit fields or one signed amount field. Include the currency and avoid floating-point rounding in financial calculations by using decimal types in your code.

### Is there a standard JSON format for financial data?

Not for bank statements: each tool defines its own schema, so pick one and map every source to it. For regulatory financial reporting, XBRL International publishes xBRL-JSON, a standard JSON form of XBRL report data that became a Recommendation in October 2021.

### Is it safe to send bank statements to a conversion API?

Use a vendor with SOC 2 Type 2 compliance, encryption in transit and at rest, and clear data retention settings. Avoid free online converters for customer data.

**Sources**

1. [IETF RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format](https://www.rfc-editor.org/rfc/rfc8259)
2. [IETF RFC 3339: Date and Time on the Internet (ISO 8601 profile)](https://www.rfc-editor.org/rfc/rfc3339)
3. [XBRL International: xBRL-CSV and xBRL-JSON reach Recommendation status (2021)](https://www.xbrl.org/news/the-future-is-here-xbrl-csv-and-xbrl-json-reach-recommendation-status/)

First published Feb 27, 2024. Last updated Sep 26, 2026.

**Written by** [Ritu John](https://www.docsumo.com/blog-authors/ritu-john) · Digital Content Expert, Docsumo

Ritu is a seasoned writer and digital content creator with a passion for exploring the intersection of innovation and human experience. As a writer, her work spans various domains, making content relatable and understandable for a wide audience.

[LinkedIn](https://www.linkedin.com/in/ritujohn) · [All posts by Ritu](https://www.docsumo.com/blog-authors/ritu-john)

- [AI bank statement analysis: how it works and what you get from it](https://www.docsumo.com/blog/ai-bank-statement-analysis)
- [ACORD 25 data extraction: fields, checks and automation](https://www.docsumo.com/blog/acord-25-data-extraction)
- [What is file parsing? Techniques, tools and Python examples](https://www.docsumo.com/blog/file-parsing)

## Keep reading

- [Bank statement APIs: how they work, what they return and how to choose one](https://www.docsumo.com/blog/bank-statement-verification-api): For developers and product teams at lenders and fintechs. It sets out the three kinds of bank data API, what a statement extraction API returns, and what to test before you choose one.
- [How to convert PDF bank and credit card statements to Excel](https://www.docsumo.com/blog/convert-bank-statement-pdf-to-excel): For bookkeepers, lenders and finance teams. How to get a bank or credit card statement into Excel, where each method breaks, and one statement worked through in Docsumo.
- [Bank statement extraction: how it works, what to check and how to automate it](https://www.docsumo.com/blog/bank-statement-extraction): For lenders, underwriters, accountants and operations teams who still key bank statements by hand. It covers how extraction works, which fields and checks matter, and how to roll it out.

[More on bank statements & lending](https://www.docsumo.com/blog#posts-lending)

## Next steps

- [Book a demo](https://www.docsumo.com/book-a-demo)
- [Get a free trial (1,000 pages)](https://www.docsumo.com/free-trial)
- [Contact sales or support](https://www.docsumo.com/contact)
- [agents.md](https://www.docsumo.com/agents.md): connect Docsumo to your AI agent with Docsumo MCP
- [llms.txt](https://www.docsumo.com/llms.txt) lists the key pages; add .md to any page's URL for its Markdown copy
