Build Status codecov Maven Central Join the chat at

kantan.csv is a library for CSV parsing and serialisation written in the Scala programming language.

Getting started

kantan.csv is currently available for Scala 2.10, 2.11 and 2.12.

The current version is 0.1.18-SNAPSHOT, which can be added to your project with one or more of the following line(s) in your SBT build file:

// Core library, included automatically if any other module is imported.
libraryDependencies += "com.nrinaudo" %% "kantan.csv" % "0.1.18-SNAPSHOT"

// Java 8 date and time instances.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-java8" % "0.1.18-SNAPSHOT"

// Provides scalaz type class instances for kantan.csv, and vice versa.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-scalaz" % "0.1.18-SNAPSHOT"

// Provides cats type class instances for kantan.csv, and vice versa.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-cats" % "0.1.18-SNAPSHOT"

// Automatic type class instances derivation.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-generic" % "0.1.18-SNAPSHOT"

// Provides instances for joda time types.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-joda-time" % "0.1.18-SNAPSHOT"

Additionally, while kantan.csv comes with a default parser / serializer (that has pretty good performances), some people might prefer to use older, more reputable implementations. The following engines are currently supported:

// opencsv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-opencsv" % "0.1.18-SNAPSHOT"

// commons-csv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-commons" % "0.1.18-SNAPSHOT"

// jackson-csv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-jackson" % "0.1.18-SNAPSHOT"


CSV is an unreasonably popular data exchange format. It suffers from poor (or at the very least late) standardisation, and is often a nightmare to work with when it contains more complex data than just lists of numerical values.

I started writing kantan.csv when I realised I was spending more time dealing with the data container than the data itself. My goal is to abstract CSV away as much as possible and allow developers to describe their data and where it comes from, and then just work with it.

kantan.csv is meant to be RFC compliant, but flexible enough that it should parse any sane variation on the format. Should you find CSV files that don’t parse, please file an issue and I’ll look into it.

While I’m pretty happy with kantan.csv, or at least the direction it’s headed, I do not pretend that it will fit all use cases. It fits mine, but might not work for everyone. I’m happy to hear suggestions on how this can be addressed, though.


The following tutorials are available: