generateparsetransformstringify

Comprehensive CSV suite combining 4 well tested packages to generate, parse, transform and stringify CSV data.

CSV & JSON convertor tool

This is a full-featured CSV parsing tool running entirely on your brower. No data leave your computer ! Use it also to learn how to use our packages and to test the various options interactively.

Convertor tool

csv-generate

NPM version Travis build status

Write random and user-defined strings, objects and arrays

csv-parse

NPM version Travis build status

Read CSV strings and buffers and write object and arrays

stream-transform

NPM version Travis build status

Read and write objects and arrays

csv-stringify

NPM version Travis build status

Read object and arrays and write CSV strings

Latest news

Try the new CSV & JSON convertion tool!

By wdavidw | January 15th, 2019

We just published a new conversion tool which takes a CSV input and convert it to JSON. Use it as a playground to learn how to use our packages, test your options interactively or as a full-featured CSV parsing tool.

CSV 5.0.0

By wdavidw | November 21th, 2018

Version 5.0.0 includes the latest csv-parse and csv-stringify respectively with version 4.0.1 and 5.0.0.

CSV Stringify 5.0.0

By wdavidw | November 21th, 2018

Version 5.0.0 introduces the new quoted_match option and support options written both in the underscore and camelcase forms. Some options were renamed. Thus rowDelimiter is now record_delimiter and formatters is now cast. Read the changelog!

CSV Parse 4.0.0 - re-writing and performance

By wdavidw | November 19th, 2018

Version 4.0.0 is a complete re-writing of the project focusing on performance. It also comes with new functionalities as well as some cleanup in the option properties and the exported information. The official website is updated and the changelog contains the list of changes for this major release. Learn more!

Quick Example

// Import the package main module
const csv = require('csv')
// Use the module
csv
// Generate 20 records
.generate({
  delimiter: '|',
  length: 20
})
// Parse the records
.pipe(csv.parse({
  delimiter: '|'
}))
// Transform each value into uppercase
.pipe(csv.transform(function(record){
   return record.map(function(value){
     return value.toUpperCase()
   });
}))
// Convert the object into a stream
.pipe(csv.stringify({
  quoted: true
}))
// Print the CSV stream to stdout
.pipe(process.stdout)