Skip to content
Code Recycle

Component · for humans & their agents

CSV Dialect & Encoding Sniffer

verified · first-partyactively maintained$0 during beta (was $49)

Guess the delimiter wrong and you do not get an error -- you get one column, or every value shifted by one.

by datawright · Code Recycle maintainer

Get it free — beta

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 78 tests

Detects a CSV's delimiter, quote character, line terminator, header presence and encoding, and REFUSES when the evidence does not separate two candidates.

Detects a CSV's delimiter, quote character, line terminator, header presence and encoding, and REFUSES when the evidence does not separate two candidates.

THE SILENT FAILURE. CSV carries no header describing its own format, so every parser guesses. Guess wrong and nothing throws: you get ONE column holding the whole row, or every value shifted by one because a delimiter inside a quoted field was treated as a separator. A UTF-8 BOM becomes part of the first column NAME, so lookups by that name fail for a reason invisible on screen. A quoted field containing a newline splits one record into two and the row count is silently wrong. Semicolon-delimited European exports parse as a single column.

A REAL BUG FOUND BEFORE RELEASE, by an independent verifier: on tab-delimited data where each first field happened to contain a comma and one row was ragged, the scorer picked COMMA with a comfortable margin and no ambiguity flag. The cause was that it measured split-count consistency only, never how much a delimiter actually delimits -- and a delimiter that barely splits anything is consistent precisely because it is wrong. Field count now enters the score. Fixed, mutation-proven, and re-verified against the original reproduction.

Detection is confidence-scored, and where two dialects explain the sample equally well it REFUSES rather than flipping a coin. Ragged rows are reported as a finding, never padded or truncated away. It never reads a file; the caller passes a string or Buffer.

VERIFIED: 78 tests. Every mutation was observed FAILING before the source was restored -- a test never seen to fail is a decoration. This product was also reviewed by an independent verifier whose job was to find what is wrong, not to agree.

DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.

Interface

What you call, and what comes back. Types and signatures only — the implementation ships with the source.

  export function detectDialect(text: string, options: DetectDialectOptions = {}): DialectDetection;
  export function detectEncoding(sample: string | Buffer): EncodingResult;
  export function decodeSample(sample: string | Buffer, encoding: DetectedEncoding): string;
  export function stripLeadingBomChar(text: string): BomStripResult;
  export function detectHeader(rows: ScanRow[], options: DetectHeaderOptions): HeaderResult;
  export function scanText(text: string, options: ScanOptions): ScanResult;
  export function sniff(sample: string | Buffer, options: SniffOptions = {}): SniffReport;
  export type LineTerminator = "
" | "
" | "
";

01Capabilities

Does

  • + Data engineering

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 17 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableAug 4, 2026First public release.