<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TioZe</title>
    <description>The latest articles on DEV Community by TioZe (@tiozerj).</description>
    <link>https://dev.to/tiozerj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3832564%2Fdf9d0838-e0f2-493a-b669-2deb4a4ce113.png</url>
      <title>DEV Community: TioZe</title>
      <link>https://dev.to/tiozerj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tiozerj"/>
    <language>en</language>
    <item>
      <title>I built a local-only PDF bank statement parser with a plugin system — here's how it works</title>
      <dc:creator>TioZe</dc:creator>
      <pubDate>Wed, 18 Mar 2026 20:09:36 +0000</pubDate>
      <link>https://dev.to/tiozerj/i-built-a-local-only-pdf-bank-statement-parser-with-a-plugin-system-heres-how-it-works-3gd8</link>
      <guid>https://dev.to/tiozerj/i-built-a-local-only-pdf-bank-statement-parser-with-a-plugin-system-heres-how-it-works-3gd8</guid>
      <description>&lt;h1&gt;
  
  
  I built a local-only PDF bank statement parser — here's how it works
&lt;/h1&gt;

&lt;p&gt;Every month I'd open my credit card PDF, manually copy transactions into a spreadsheet, and think "there has to be a better way." So I built &lt;strong&gt;banksheet&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;banksheet parses bank statement PDFs into CSV, Excel, or JSON — entirely on your machine. No cloud, no AI, no external APIs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx banksheet parse statement.pdf
npx banksheet parse statement.pdf &lt;span class="nt"&gt;-f&lt;/span&gt; excel &lt;span class="nt"&gt;-o&lt;/span&gt; output.xlsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The plugin architecture
&lt;/h2&gt;

&lt;p&gt;The interesting part is how new banks get added. Each bank is a single folder implementing two functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myBankParser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;BankParser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My Bank&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;US&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

  &lt;span class="nf"&gt;detect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sr"&gt;/My Bank Statement/i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;Transaction&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// extract transactions from raw PDF text&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. &lt;code&gt;detect()&lt;/code&gt; tells the engine whether this PDF belongs to that bank. &lt;code&gt;parse()&lt;/code&gt; extracts the transactions. Auto-detection tries all registered parsers and uses whichever one matches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why no AI?
&lt;/h2&gt;

&lt;p&gt;I specifically wanted this to be regex-based, not LLM-based.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic&lt;/strong&gt;: same PDF always produces the same output&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auditable&lt;/strong&gt;: you can read exactly what the parser is doing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast&lt;/strong&gt;: no inference time, no API latency&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private&lt;/strong&gt;: your transaction data stays local&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tradeoff is that each bank needs a hand-written parser. But that's also why the plugin system exists — the community can cover banks I don't have statements for.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's hard about parsing bank PDFs
&lt;/h2&gt;

&lt;p&gt;PDF text extraction is messier than you'd expect. Banks don't use consistent formatting. Common issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Words get merged: "R$1.234,56Compra" with no space between amount and description&lt;/li&gt;
&lt;li&gt;Dates split across lines depending on column layout&lt;/li&gt;
&lt;li&gt;Multi-line transaction descriptions that need to be concatenated&lt;/li&gt;
&lt;li&gt;Password-protected files (supported via pdf-parse options)&lt;/li&gt;
&lt;li&gt;Different layouts for the same bank depending on statement month or account type&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each plugin's README documents the quirks it handles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;TypeScript monorepo with three packages: &lt;code&gt;core&lt;/code&gt; (parsing engine + plugins), &lt;code&gt;cli&lt;/code&gt;, and &lt;code&gt;web&lt;/code&gt; (Express + vanilla JS for drag-and-drop).&lt;/p&gt;

&lt;p&gt;Currently supports Nubank, Itaú, Bradesco, and Inter (Brazilian banks, credit card). More banks welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo&lt;/strong&gt;: &lt;a href="https://github.com/tio-ze-rj/banksheet" rel="noopener noreferrer"&gt;https://github.com/tio-ze-rj/banksheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love to hear if anyone adds a plugin for a bank outside Brazil — the architecture should work for any country.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>privacy</category>
      <category>showdev</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
