FlameCsv is a blazing fast fully-featured CSV library.
$ dotnet add package FlameCsvFully-featured high performance CSV library for .NET with a simple API, deep customization options, and built-in support for UTF8, nativeAOT, and more. Read CSV at multiple gigabytes per second on consumer hardware, and write arbitrarily large amounts of CSV with near-zero allocations. FlameCSV leverages modern .NET patterns and libraries such as spans, SIMD hardware intrinsics, memory/string pooling, pipes and buffer writers, and is built from the ground up to provide an easy-to-use high performance experience.
FlameCsv is consistently the fastest .NET CSV library in the available benchmarks. The library has thousands of tests, and critical paths have been fuzz-tested with SharpFuzz.
See the documentation for more information and examples.
using FlameCsv;
const string data =
"""
id,name,age
1,Bob,42
2,Alice,37
3,"Bond, James",39
""";
List<User> users = [];
// read objects from the string
foreach (var user in CsvReader.Read<User>(data))
{
users.Add(user);
}
// write to stream using a different delimiter
await CsvWriter.WriteAsync(
new StreamWriter(Stream.Null, Encoding.UTF8),
users,
new CsvOptions<char> { Delimiter = '\t' },
cancellationToken);
\r\n can parse \n and \r as well), newline no longer nullablechars not supported in dialectAsync-suffix from CsvReader methods that support synchronous enumerationCsvUnhandledException, value enumerators now throw without wrapping the exceptionEnumNameAttributechar converter inconsistencies on non-ASCII inputsInitial release.