# League CSV

> PHP library for reading, writing and querying CSV documents

Source: https://talira.ai/catalog/league-csv-wb4n6cx2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / parsing / csv](https://talira.ai/categories/developer-tools/parsing/csv), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^2][^3]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^2]
- Backed by: [The League of Extraordinary Packages](https://talira.ai/orgs/thephpleague.md)

League CSV (league/csv) is a PHP library for parsing, writing and filtering CSV, from The League of Extraordinary Packages. It reads and writes CSV documents in a memory-efficient way, queries them and maps rows to objects, converts them to JSON, XML or HTML, and supports PHP stream filters. It's framework-agnostic, uses PHP's native features where it can, and needs the ext-filter extension. Version 9.30 and later need PHP 8.3.

## Links

- Website: https://csv.thephpleague.com/
- GitHub: https://github.com/thephpleague/csv
- Docs: https://csv.thephpleague.com/

## Problems it solves

- read a large CSV file in PHP without loading it all into memory
- export database rows to a CSV download in PHP
- filter and map the rows of a CSV file to objects in PHP

## Features

- memory-efficient reading and writing of CSV
- query features and array-to-object mapping
- conversion to JSON, XML or HTML
- PHP stream filter support
- framework-agnostic

## Limitations

- From PHP 8.6, using it with SplFileObject or SplTempFileObject instances triggers deprecation notices.[^1]

## Trust

Overall: 0.66 out of 1.
Signals: maintenance 1.00, adoption 0.71, momentum 0.41, community 0.79, backing 0.30, extensibility 0.00.

- last commit 2 days ago
- 66 commits in the last 90 days
- latest release 9.30.0 4 days ago
- 3.5k GitHub stars
- 91 contributors
- accepts sponsorship (Github)
- backed by The League of Extraordinary Packages

## Sources

[^1]: https://github.com/thephpleague/csv/blob/master/README.md (checked 29 Nov 2026)
[^2]: https://github.com/thephpleague/csv/blob/master/LICENSE (checked 29 Nov 2026)
[^3]: https://github.com/thephpleague/csv/blob/master/composer.json (checked 29 Nov 2026)
