Home

CsvHelper

CsvHelper is an open-source library for the .NET platform that facilitates reading and writing CSV (comma-separated value) files. It provides a simple, object-oriented API for parsing CSV content and for serializing objects to CSV, with configurable behavior and robust type handling. The library targets .NET Framework, .NET Core, and .NET 5/6/7+, and is widely used in data processing applications.

Key features include support for header-aware and headerless CSVs, customizable delimiters and quoting, and culture-aware parsing

Usage typically involves creating a CsvConfiguration, then using CsvReader to read from a TextReader and CsvWriter

CsvHelper originated and is maintained by a community of contributors led by Josh Close. It is released

Overall, CsvHelper is a mature, high-performance option for CSV I/O in .NET, balancing ease of use with

and
formatting.
It
offers
automatic
type
conversion
with
support
for
custom
value
converters,
as
well
as
mapping
to
POCOs
via
attributes
or
fluent
class
maps.
The
library
can
read
records
as
strongly
typed
objects
or
as
dynamic
records,
and
provides
mechanisms
to
handle
missing
or
malformed
fields,
trimming,
and
error
reporting.
to
write
to
a
TextWriter.
GetRecords<T>()
yields
strongly
typed
sequences;
mapping
can
be
done
with
attributes
such
as
Name
or
Index,
or
with
class
maps.
Writing
supports
write
records
and
headers,
with
similar
configuration
options.
under
the
MIT
license
and
distributed
via
NuGet,
with
comprehensive
documentation
and
examples
to
support
adoption
in
various
projects.
extensive
configurability
and
strong
type
safety.