Processing Pipeline
6-phase client-side repair engine
Every step executes in your browser's JavaScript runtime. Network: zero calls.
File Read
FileReader API · ArrayBuffer
Your file is read using the browser's native FileReader API as an ArrayBuffer. The bytes never cross a network boundary — they stay in your device's RAM.
We use readAsArrayBuffer() for binary-safe analysis. No fetch(), no XMLHttpRequest, no WebSocket. Zero network calls.
Encoding Detection
Byte-pattern heuristics
The raw bytes are analyzed for encoding signatures: UTF-8 BOM (EF BB BF), UTF-16 LE/BE BOM, and Windows-1252 byte ranges (0x80–0xFF).
If CP-1252 smart quotes (0x93, 0x94) or accented characters are detected, we transcode byte-by-byte to valid UTF-8.
Delimiter Analysis
Frequency matrix · RFC 4180
We build a frequency matrix of candidate delimiters (comma, semicolon, tab, pipe) against the first N rows. The delimiter with the most consistent column count wins.
Handles edge cases: quoted fields containing delimiters, mixed-newline files (\r\n vs \n), and Excel's semicolon-as-default for European locales.
State Machine Parser
Character-by-character · Quote-aware
A hand-written state machine parses the CSV character-by-character. It tracks whether the cursor is inside a quoted field, handling escaped quotes ("") and multi-line values.
The parser only enters quote-mode at exact field boundaries, preventing unescaped mid-field quotes from causing row-count bleeding.
Normalization & Repair
Quote escaping · Whitespace trim · BOM strip
Smart quotes (Unicode curly quotes) are converted to straight ASCII quotes. Unescaped quotes inside fields are escaped per RFC 4180. BOMs, null bytes, and control characters are stripped.
Each repair operation is tracked and counted, giving you a complete audit trail of exactly what changed in your file.
Clean CSV Output
Blob API · Download via URL.createObjectURL
The repaired data is serialized back to RFC 4180 compliant CSV. A Blob is created in-memory, and a download link is generated using URL.createObjectURL() — still zero network.
The Blob is released from memory after download via URL.revokeObjectURL(). No data persists anywhere.
Verify, don't trust
Trust proofs you can verify yourself
Every claim has a reproducible verification step. Open DevTools and check.
Open DevTools → Network tab → drag a file. You'll see zero POST requests. The File object is read locally via FileReader.
We use Plausible Analytics (plausible.io) — cookieless, GDPR-compliant. It tracks page views only, not file content, names, or sizes.
Structra is deployed as a static Next.js export. There is no API server, no database connection string, no server-side runtime for user files.
A Service Worker caches the application shell. After first load, the CSV repair engine works completely offline — verify by toggling Airplane Mode.
No cookies store file data. No localStorage persists your CSV. No IndexedDB. The file exists only in JavaScript heap memory during processing and is garbage-collected after.
View the processing engine in DevTools → Sources → lib/csv-fixer.ts. The entire parser is ~400 lines of TypeScript compiled to client-side JavaScript.
Seen enough? Try it.
Drop a CSV and watch the Network tab. Zero outbound requests.