
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
CSV-ES is a universal JavaScript CSV parser designed specifically to be simple, fast, and spec compliant.
npm install csv-es
import * as CSV from 'csv-es';
or
import { parse, stringify } from 'csv-es';
Takes a string of CSV data and converts it to a 2 dimensional array of [entries][values]
CSV.parse(csv, {options}, reviver(value, row, col)) : [entries][values]
false)(value) => value)1 Values for row and col are 1-based.
import CSV from '/path/to/csv/index.js';
const csv = `
"header1,header2,header3"
"aaa,bbb,ccc"
"zzz,yyy,xxx"
`;
const parsed = CSV.parse(csv)
console.log(parsed);
> [
> [ "header1", "header2", "header3" ],
> [ "aaa", "bbb", "ccc" ],
> [ "zzz", "yyy", "xxx" ]
> ]
Takes a 2 dimensional array of [entries][values] and converts them to CSV
CSV.stringify(array, {options}, replacer(value, row, col)) : string
true)(value) => value)1 Values for row and col are 1-based.
import CSV from '/path/to/csv/index.js';
const data = [
[ "header1", "header2", "header3" ],
[ "aaa", "bbb", "ccc" ],
[ "zzz", "yyy", "xxx" ]
];
const stringified = CSV.stringify(data)
console.log(stringified);
> "header1,header2,header3"
> "aaa,bbb,ccc"
> "zzz,yyy,xxx"
A .cjs bundle is included for CommonJS compatibility
const CSV = require('csv-es');
const csv = // the csv string
const data = CSV.parse(csv);
const CSV = require('csv-es');
const data = // the a 2-dimensional array
const csv = CSV.stringify(data);
Typings are generated from JSDoc using Typescript. They are 100% compatible with VSCode Intellisense and will work seamlessly with Typescript.
FAQs
A modern, fast, RFC 4180 compliant parser for JS
The npm package csv-es receives a total of 6 weekly downloads. As such, csv-es popularity was classified as not popular.
We found that csv-es demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.