Comma-Separated Values

CSV

Comma-Separated Values is the oldest and most widely supported tabular format there is. It is also the least specified, which is why two tools can both be "correct" and still disagree about your file.

Type information
None — every value is text
Structure
Flat rows and columns
Compression
None
Typical file size
Baseline (100%)
Schema
Header row at best
Human-readable
Yes, in any text editor
Tool support
Universal

CSVParquet

Runs on your device
Options

Reading CSV

Writing Parquet

Parquet is unreadable in a text editor. That is by design.Check your new Parquet file with ParquetReader — opens Parquet files directly.

A CSV file is text: one record per line, fields separated by a delimiter, with quotes around values that contain the delimiter. RFC 4180 wrote this down in 2005, long after everyone had already implemented their own version. In practice you will meet files that use semicolons, that quote everything, that quote nothing, that end lines with a bare carriage return, or that begin with a byte order mark.

The format carries no type information at all. Every value is text, so the program reading it has to guess whether 01234 is a number or a postcode, and whether 1/2/2024 is January or February. Those guesses are where most CSV data loss happens — not in the parsing, but in the interpretation afterwards.

None of that makes CSV a bad choice. It stays the right answer for handoffs between unlike systems, for anything a human might open in a text editor, and for data small enough that efficiency does not matter. It stops being the right answer the moment you are scanning it repeatedly, at which point a typed columnar format pays for itself immediately.

What CSV is good at

  • Opens in literally everything, from Excel to a text editor to a shell one-liner.
  • Streams line by line, so a reader never needs the whole file in memory.
  • Diffs cleanly in Git when the row order is stable.
  • Trivial to produce from any language without a library.

Where it falls short

  • No types: numbers, dates and booleans are indistinguishable from text.
  • No schema, so a missing column is only discovered by the reader.
  • No compression, making it the largest common format on disk.
  • No standard for delimiters, encoding or line endings, so files disagree.
FAQ

CSV questions

Why does Excel split my CSV incorrectly?
Excel uses your system list separator, which is a semicolon in many European locales. A comma-delimited file opened in such a locale lands entirely in column A. Converting to .xlsx directly avoids the import step and the guessing.
Why do my leading zeros disappear?
Because the reader inferred a number type. Postcodes, phone numbers and product codes need to stay text. This converter keeps any value with a leading zero as text for exactly that reason.
What is a BOM and do I need one?
A byte order mark is a three-byte prefix that tells a reader the file is UTF-8. Excel needs it to display accented and non-Latin characters correctly. Most other tools do not care, and a few older ones are confused by it.

Other format guides: Parquet · JSON · JSONL · Excel · TSV