The CSV project offers Node.js libraries to generate, parse, transform, and serialize CSV data. An umbrella csv package composes csv-parse, csv-stringify, csv-generate, and stream-transform.
Overview
Node CSV is a family of packages for working with comma-separated data in Node.js. Together they cover generating sample or custom rows, parsing text into arrays or objects, transforming record streams, and writing CSV output, with both streaming pipelines and synchronous helpers.
The monorepo publishes separate NPM modules plus a combined csv entry that can pipe generate, parse, transform, and stringify stages. Options include delimiters, quoting, casting hooks, and comment handling, with documentation and examples on the project website.
APIs support ECMAScript modules and CommonJS, optional callbacks, sync variants under csv/sync, and stream-based piping for larger datasets. The maintainers describe long production use, broad test coverage, and few dependencies.
The website also hosts a browser-side CSV and JSON converter that runs locally without sending data off the machine, useful for trying package options interactively.
Key features
- csv-parse for text to records
- csv-stringify for records to CSV text
- csv-generate for test or custom rows
- stream-transform record pipelines
- Sync and streaming APIs
- ECMAScript module and CommonJS support
- Browser CSV to JSON converter tool
- Casting and delimiter customization
Use cases
- Parsing large CSV files in Node streams
- Building ETL pipes that reshape CSV rows
- Generating fixture CSV data in tests
- Converting between CSV and JSON in the browser demo
- Composing multi-step CSV workflows with the umbrella package