Skip to content
Fast C# CSV parser
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Release 1.0 preparations Nov 28, 2018
.gitignore Initial code Nov 27, 2018
LICENSE Initial code Nov 27, 2018 Release 1.0 preparations Nov 28, 2018


Ultra-fast C# CSV parser: implements stream reader and writer. NuGet Release

  • very fast: x2-x4 times faster than JoshClose's CSVHelper
  • memory efficient: uses only single circular buffer, no allocations in heap for CSV of any size
  • lightweight: bare csv parser with simple API
  • tolerant to not-fully correct CSV files, you can control max length of CSV file (useful for processing end-user CSV uploads)
  • can be used for stream processing of many-GB CSV files
  • supports .NET Framework 4.5+ and .NET Core

How to use

Parse CSV stream:

using (var streamRdr = new StreamReader(inputStream)) {
  var csvReader = new CsvReader(streamRdr, ",");
  while (csvReader.Read()) {
    for (int i=0; i<csvReader.FieldsCount; i++) {
      string val = csvReader[i];

Generate CSV to stream:

using (var streamWr = new StreamWrite(outputStream)) {
  var csvWriter = new CsvWriter(streamWr);
  // write line
  csvWriter.WriteField("Value with double quote\"");
  csvWriter.WriteField("And with\nnew line");

Who is using this?

NReco.Csv is in production use at and PivotData microservice.


Copyright 2017-2018 Vitaliy Fedorchenko and contributors

Distributed under the MIT license

You can’t perform that action at this time.