https://github.com/osiegmar/fastcsv
CSV library for Java that is fast, RFC-compliant and dependency-free. ⭐️ Star to support our work!
https://github.com/osiegmar/fastcsv
csv csv-parser csv-reader java zero-dependency
Last synced: 3 days ago
JSON representation
CSV library for Java that is fast, RFC-compliant and dependency-free. ⭐️ Star to support our work!
- Host: GitHub
- URL: https://github.com/osiegmar/fastcsv
- Owner: osiegmar
- License: mit
- Created: 2014-06-22T08:10:16.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2025-05-11T12:02:42.000Z (11 months ago)
- Last Synced: 2025-05-14T23:06:31.015Z (11 months ago)
- Topics: csv, csv-parser, csv-reader, java, zero-dependency
- Language: Java
- Homepage: https://fastcsv.org/
- Size: 2.31 MB
- Stars: 595
- Watchers: 15
- Forks: 95
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
FastCSV: fast, lightweight, and easy to use — the production-proven CSV library for Java.
It’s the most-starred CSV library for Java and trusted by leading open-source projects such as Apache NiFi, JUnit and Neo4j.
## Features
_Here are the top reasons to choose FastCSV — see [fastcsv.org](https://fastcsv.org) for the full feature list._
- **Fast CSV processing** — optimized for high-speed reading and writing
- **Tiny footprint** — only ~90 KiB, with zero runtime dependencies
- **Developer-friendly API** — clean, intuitive, and easy to integrate
- **Well-documented** — Quickstart guides and complete Javadoc
- **High test coverage** — including mutation testing for reliability
- **RFC 4180 compliant** — handles edge cases correctly
- **Robust & maintainable** — uses SpotBugs, PMD, Error Prone, NullAway, and Checkstyle to ensure code quality; never returns null unexpectedly
- **Secure** — fuzz-tested via OSS-Fuzz and following OpenSSF best practices
- **Production-proven** — trusted by open-source projects like JUnit
- **Java 17+, Android 34+** compatible — including GraalVM Native Image and OSGi
## Performance

Based on the [Java CSV library benchmark suite](https://github.com/osiegmar/JavaCsvBenchmarkSuite).
## Quick Start
### Writing CSV
```java
try (CsvWriter csv = CsvWriter.builder().build(Path.of("output.csv"))) {
csv
.writeRecord("header 1", "header 2")
.writeRecord("value 1", "value 2");
}
```
### Reading CSV
```java
try (CsvReader csv = CsvReader.builder().ofCsvRecord(Path.of("input.csv"))) {
csv.forEach(IO::println);
}
```
---
For more examples and detailed documentation, visit [fastcsv.org](https://fastcsv.org).
If you find FastCSV useful, consider leaving a [star](https://github.com/osiegmar/FastCSV)!
## License
[MIT](LICENSE)