Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A streaming csv parser for node, with smart quote handling
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Example usage:

var csvparser = require('csvparser');

var stream = fs.ReadStream(file);
var onrow = function(row) {


csvparser.parse(stream, {headers:true, onrow: onrow});

If the headers option is set to true, the values in the first row are considered column names. the onrow callback is not called for the first row and the callback receives an object with the column names as attributes. If a certain row contains more values that columns are specified in the header, these values will be cut off.

If the headers option is set to false, the onrow callback is called for all rows, including the first one. The callback receives an array in this case.

Below a reference of all available options with their default value:

    headers: true,
    separator: ',',
    encoding: "utf8",
    onrow: null
Something went wrong with that request. Please try again.