OFX/QFX Parsing in JavaScript Without the Pain
npm install @gristmill-dev/gristmill — parse bank exports that would break strict XML parsers, get cents-exact transactions back.
If you're building a budgeting app, an importer, or a finance dashboard, bank-file parsing is the swamp at the edge of your map. Gristmill is a zero-dependency TypeScript library that drains it.
What it handles
- OFX v1/v2 SGML headers, unclosed tags, unescaped entities, empty elements
- Timezone-suffixed dates → ISO strings
- Amounts as integer minor units (no float drift)
- Bank and credit-card statement layouts
- CSV dialect sniffing: delimiters, date formats, column mapping
- Deterministic dedup (pending→posted) and a recurring-payment graph with price-drift tracking
Quick start
import { parseOfx, dedupe, detectRecurring } from "@gristmill-dev/gristmill";
const txs = parseOfx(qfxFileContents);
const { kept } = dedupe(txs);
const subs = detectRecurring(kept);
Apache-2.0 licensed, test suite included with real-world malformed fixtures. Need it hosted as an API instead? That's coming — star the repo to hear about it first.
Clean your export now — free, no signup →🔒 Everything runs in your browser. Files never leave your device.