csv-parse

A flexible, dependency-free CSV parser for Node.js and the browser with stream, callback, and sync APIs.

Library
npm
v7.0.2
4,282stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
74/100Good
Development Activity84
Maintenance48
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
88/100Excellent
Architecture90
Code Quality88
Innovation87
Learning Curve85

csv-parse is a mature CSV parser that converts CSV text into arrays or objects. It implements the Node.js stream.Transform API while also offering simpler callback and synchronous interfaces, so you can pick the flavor that fits your workload. First released in 2010 and part of the broader CSV project by Adaltas, it is battle-tested against large datasets by a wide community.

The parser handles the full range of real-world CSV quirks: custom delimiters, quotes, escape characters, comments, BOM handling, and automatic line-break discovery. It ships with zero external dependencies and multiple distributions covering Node.js, the web, ECMAScript modules, and CommonJS.

What You Get

  • A streaming parser implementing the Node.js stream.Transform API for backpressure-aware pipelines
  • Callback and synchronous APIs for convenient one-shot parsing without wiring up streams
  • A rich option set covering delimiters, quotes, escapes, comments, columns, casting, and BOM handling
  • Multiple distributions: Node.js, browser, ESM, and CommonJS with bundled TypeScript type definitions
  • Zero runtime dependencies and support across Node.js 8 through the latest release

Common Use Cases

  • Ingesting large CSV exports into a Node.js data pipeline via streams
  • Parsing user-uploaded CSV files into typed objects in a web application
  • Quickly converting a CSV string to an array of records synchronously in a script or test
  • Reading delimited data (TSV, colon-separated, custom delimiters) from external systems

Under The Hood

Architecture

csv-parse is structured around a framework-agnostic parsing core in lib/api/index.js (the transform function) that maintains an incremental byte-level state machine, tracking quoting, escapes, record delimiters, comments, and column mapping across buffer chunks via init_state.js and normalize_options.js. Three thin adapters wrap this core: lib/index.js exposes a Parser class extending Node’s stream.Transform plus a flexible parse() function that detects string/options/callback arguments; lib/sync.js drives the same core in a single blocking pass; and lib/stream.js provides a web-stream binding. Records flow out through a push callback, keeping the engine decoupled from the delivery mechanism.

Tech Stack

Written in modern JavaScript (ESM source) with hand-authored TypeScript declarations (lib/index.d.ts). The package is dependency-free at runtime and built with Rollup, producing CJS and ESM/browser distributions under dist/. Dev tooling includes Mocha with tsx for tests, Prettier, ESLint, and TypeScript for type-checking. It is part of a Lerna-managed monorepo alongside csv-generate, csv-stringify, and stream-transform.

Code Quality

Code quality is high. The repository holds roughly 90 test files plus 72 sample inputs, giving the parser broad coverage across options and edge cases; tests run under Mocha against both JS and TS. Errors are surfaced through a dedicated CsvError class carrying stable error codes (e.g. CSV_INVALID_ARGUMENT), and option normalization is centralized and heavily validated. Naming is descriptive and the core is clearly separated from its stream/sync/web adapters.

API Design

The public API is deliberately ergonomic: a single parse entry point accepts data, options, and callback in flexible order, while csv-parse/sync and csv-parse/stream subpath exports keep each usage style explicit. Options are richly documented on csv.js.org with numerous examples, and TypeScript types are bundled. Getting started requires almost no boilerplate for the sync and callback paths, while the stream API follows familiar Node.js conventions.

Used by 21 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

23,887

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
94%
MIT

Actual

Invoicing Finance

28,224

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
77
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
49%
MPL 2.0

Artillery

Devops · Developer Tools

9,054

Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.

View details
89
Repo Health
73
Technical
68
Dependency
Built with
TypeScript49%
JavaScript48%
Updated 5 days ago
TypeScript
92%
AGPL 3.0

Documenso

Digital Signiture

14,603

Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.

View details
93
Repo Health
79
Technical
72
Dependency
Built with
TypeScript92%
Updated today
TypeScript
98%
Other

Formbricks

Forms Surveys · Marketing · Analytics

12,790

Open-source experience management platform for in-app, website, email, and link surveys — privacy-first and fully self-hostable.

View details
93
Repo Health
81
Technical
73
Dependency
Built with
TypeScript98%
Updated today
TypeScript
98%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

485

Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.

View details
90
Repo Health
81
Technical
70
Dependency
Built with
TypeScript98%
Updated today
TypeScript
61%
EPL-2.0

Huly Platform

Project Management · Team Chat · Collaboration

27,384

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
90
Repo Health
86
Technical
64
Dependency
Built with
TypeScript61%
Svelte34%
Updated 1 weeks ago
TypeScript
95%
Apache 2.0

InsForge

Developer Tools · Databases

12,741

The all-in-one, open-source backend platform purpose-built for AI coding agents — giving your agent database, auth, storage, edge functions, a model gateway, and compute to ship full-stack apps end-to-end.

View details
86
Repo Health
81
Technical
73
Dependency
Built with
TypeScript95%
Updated yesterday
TypeScript
99%
AGPL 3.0

Karakeep

Bookmarks Archiving

28,454

Self-hosted bookmark manager that captures links, notes, images, and PDFs with AI tagging, full-text search, and automatic archiving.

View details
88
Repo Health
76
Technical
67
Dependency
Built with
TypeScript99%
Updated 3 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search