APIs & Authentication
What is CSV?
Comma-Separated Values, a plain-text tabular format where each line is a row and columns are separated by a delimiter (usually a comma).
Also known as: Comma-Separated Values
CSV is the lowest-common-denominator data format. A header row names the columns, every subsequent row is a record, fields are separated by commas, and any field containing a comma, quote, or newline is wrapped in double quotes (with internal quotes doubled). Excel exports it, every database imports it, every language has a parser in the standard library.
The format is older than its standard (RFC 4180) and the standard is widely ignored. Real-world CSV uses tabs, semicolons, or pipes as delimiters; uses Windows or Unix line endings; sometimes has a BOM at the start; sometimes wraps every field in quotes; sometimes has trailing whitespace. A robust CSV parser sniffs the dialect rather than assuming.
For data exchange, CSV is still the default for tabular handoffs: bulk uploads to ad platforms, exports from CRMs, datasets shared between teams. Where it falls down is hierarchical data (nested objects), large strings (no compression, no streaming-friendly schema), and anything that needs strong typing. JSON Lines or Parquet are the typical replacements.
In the wild
- →A nightly export of CRM contacts shipped as
contacts.csvwith 30,000 rows - →An ad platform accepting a CSV upload of campaign updates and rejecting any row with malformed escaping
- →A data team converting CSV to Parquet at ingestion time so analytics queries do not re-parse text
How Brand.dev uses csv
Endpoints in the Brand.dev API where this concept comes up directly.
FAQ
How do I handle commas inside CSV fields?
Wrap the field in double quotes: "Smith, John". If the field also has a quote, double it: "He said ""hi""". Always use a real CSV library; do not split on commas yourself.
CSV vs JSON Lines?
JSONL preserves nested structure and types and is friendlier for large datasets. CSV is half the size when the data is genuinely tabular and is the only format some downstream tools accept.
How do I detect CSV dialect?
Python's csv.Sniffer, R's readr autodetection, and most modern DataFrame libraries do this for you. Failing that, look at the first few lines: count delimiters, detect quotes, decide.
Related terms
JavaScript Object Notation, a lightweight text format for representing structured data, supported natively by every modern language.
Extensible Markup Language, a self-describing text format for structured data, predating JSON and still ubiquitous in enterprise systems, sitemaps, and RSS feeds.
A human-readable data serialization format that uses indentation rather than braces, popular for configuration files (CI pipelines, Kubernetes manifests, OpenAPI specs).