<?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: Muhammad Sharif</title>
    <description>The latest articles on DEV Community by Muhammad Sharif (@muhammad_sharif_438c4b389).</description>
    <link>https://dev.to/muhammad_sharif_438c4b389</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4174512%2F2fdee0b6-df9f-42e0-83bb-bbc0978dca91.jpg</url>
      <title>DEV Community: Muhammad Sharif</title>
      <link>https://dev.to/muhammad_sharif_438c4b389</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammad_sharif_438c4b389"/>
    <language>en</language>
    <item>
      <title>I Built a Bank Statement Converter That Never Uploads Your Files</title>
      <dc:creator>Muhammad Sharif</dc:creator>
      <pubDate>Sat, 10 Oct 2026 04:33:55 +0000</pubDate>
      <link>https://dev.to/muhammad_sharif_438c4b389/i-built-a-bank-statement-converter-that-never-uploads-your-files-9ae</link>
      <guid>https://dev.to/muhammad_sharif_438c4b389/i-built-a-bank-statement-converter-that-never-uploads-your-files-9ae</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;A bank statement shows where you live, where you shop, and how much you earn. Bookkeepers and accountants handle this kind of document for many clients, every month.&lt;/p&gt;

&lt;p&gt;When I looked for a tool to convert a PDF statement into a spreadsheet, almost every option asked me to do the same thing: upload the file to their server, trust their privacy policy, and hope it gets deleted later.&lt;/p&gt;

&lt;p&gt;That felt backwards. So I built something different.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: no server, no upload
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://statementharbor.com" rel="noopener noreferrer"&gt;StatementHarbor&lt;/a&gt; is a bank statement converter that runs entirely in your browser. There is no upload button because there is no server to upload to.&lt;/p&gt;

&lt;p&gt;The benefits turned out to be bigger than I expected:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy:&lt;/strong&gt; the file never leaves your computer, so there is nothing to leak or breach.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No signup:&lt;/strong&gt; there is no account system because there is nothing to store.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No limits:&lt;/strong&gt; conversions cost me nothing, so there are no page limits or paywalls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline:&lt;/strong&gt; once the page has loaded, it keeps working without internet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;At a high level, the pipeline looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read the PDF locally.&lt;/strong&gt; The browser reads the file with the File API, and a JavaScript PDF library extracts the text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get text with positions.&lt;/strong&gt; A PDF has no real "table" concept. It is a set of text fragments with x/y coordinates, so I extract each fragment together with its position.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rebuild the rows.&lt;/strong&gt; I group fragments with similar y-values into rows, then sort each row by x-value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detect columns.&lt;/strong&gt; I identify the date, description, amount, and balance columns from the header row and the alignment of values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export.&lt;/strong&gt; The result becomes a CSV for Excel or Google Sheets, or a QBO file that QuickBooks Online can import directly.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A simplified example of the row-grouping idea:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Group text items into rows by their vertical position&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;groupIntoRows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tolerance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;tolerance&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;cells&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;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cells&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;rows&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cells&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&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;h2&gt;
  
  
  The hard parts
&lt;/h2&gt;

&lt;p&gt;Parsing bank statements is messier than it looks. A few things that gave me trouble:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every bank has its own layout.&lt;/strong&gt; Column positions, header names, and spacing all differ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-line descriptions.&lt;/strong&gt; One transaction can span two or three lines, and you have to decide which lines belong to which row.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date formats.&lt;/strong&gt; A statement from a US bank and one from an Indian bank write dates differently, and some omit the year on each row.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debits and credits.&lt;/strong&gt; Some statements use separate columns, others use minus signs or "CR/DR" markers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scanned statements.&lt;/strong&gt; These are images inside a PDF, so there is no text to extract. OCR is the next thing on my roadmap.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Client-side processing is more capable than people think.&lt;/strong&gt; Modern browsers handle PDF parsing without any trouble.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy can be a feature and a cost saver.&lt;/strong&gt; No server means no hosting bill that scales with usage, and no data to protect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-world data is the real test.&lt;/strong&gt; The parser only got better once I tried it on many different statements.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it and tell me what breaks
&lt;/h2&gt;

&lt;p&gt;It's free and needs no signup: &lt;strong&gt;&lt;a href="https://statementharbor.com" rel="noopener noreferrer"&gt;statementharbor.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It currently works with text-based PDF statements from banks like Chase, Wells Fargo, Bank of America, HDFC, ICICI, and SBI, with step-by-step pages for each.&lt;/p&gt;

&lt;p&gt;If a statement doesn't parse cleanly, I would love to know which bank so I can fix it. Leave a comment below or use the contact page on the site.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OCR support for scanned statements&lt;/li&gt;
&lt;li&gt;More bank formats&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading! I'd love to hear how you would approach client-side PDF parsing, or whether you've run into the same privacy concerns with upload-based tools.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
