Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

Direct comparison

CSV vs JSON: Standards and When to Use Each

CSV vs JSON compared on what RFC 4180 and RFC 8259 specify: standards status, data types, encoding, quoting and when to use each for research data.

Written and maintained by CASRAI Editorial Board

Last updated

Ask CASRAI · free to try

Ask about CSV vs JSON: Standards and When to Use Each

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

How do CSV, JSON compare side by side?

The table below compares CSV, JSON across 11 procurement-relevant dimensions, from standards status through source.

Side-by-side comparison

DimensionCSVJSON
Standards statusRFC 4180 (Y. Shafranovich, October 2005) is category Informational and "does not specify an Internet standard of any kind."RFC 8259 (December 2017) is on the Internet Standards Track.
Formal specificationRFC 4180 states that "there is no formal specification in existence, which allows for a wide variety of interpretations of CSV files."RFC 8259 defines a grammar: value = false / null / true / object / array / number / string.
StructureEach record is on a separate line, delimited by a line break (CRLF). There may be an optional header line first. Each line should contain the same number of fields throughout the file.A value can be an object or an array, and objects and arrays hold further values, so data can nest.
Data typesRFC 4180 defines structure and quoting only, with no data types. Spaces are part of a field and are not trimmed.Strings, numbers, booleans (true/false) and null, plus objects and arrays.
Quoting and edge casesFields containing line breaks, double quotes or commas should be enclosed in double quotes. A double quote inside a quoted field is escaped by another double quote.Leading zeros are not allowed in numbers, and Infinity and NaN are not permitted (RFC 8259 section 6).
Duplicate or inconsistent entriesLines are expected to carry the same number of fields ("should"), so uneven rows depart from the RFC description.Names within an object SHOULD be unique. If they are not, "the behavior of software that receives such an object is unpredictable."
EncodingThe text/csv registration has an optional charset parameter.JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 (RFC 8259 section 8.1).
Media typetext/csv, with optional parameters charset and header (present or absent). The W3C tabular data model also gives text/csv as the content type for a CSV file.application/json.
MetadataThe W3C tabular data model defines no format for embedding metadata in a CSV file beyond the header row's column titles; metadata is kept in a separate file. Units of measure are not a built-in part of that model.Objects pair each value with a name (RFC 8259 section 4), so labels travel with the values.
When to pick eachOne table whose rows share the same fields, where types and units are documented separately (for example in a W3C-style metadata file).Values that nest, or data that must carry the types the JSON grammar defines, exchanged as UTF-8.
SourceRFC 4180 and the W3C Model for Tabular Data and Metadata on the Web (Recommendation, 17 December 2015), read 2026-10-29.RFC 8259, read 2026-10-29.

Common questions

Common questions about CSV vs JSON

Is CSV a standard?

+

Not an Internet standard. RFC 4180 is an Informational RFC that "does not specify an Internet standard of any kind," and it notes that no formal specification of CSV exists. It does register the text/csv media type. The W3C tabular data model builds on RFC 4180 for tabular data on the web.

Does JSON have data types?

+

Yes. The RFC 8259 grammar defines a value as false, null, true, an object, an array, a number or a string. CSV, by contrast, is defined by RFC 4180 for structure and quoting only, with no data types.

Can CSV carry metadata such as datatypes or units?

+

Not inside the file. The W3C tabular data model defines no format for embedding metadata in a CSV file beyond column titles in the header row. Metadata is supplied separately, and units of measure are not a built-in part of the model.

What encoding must JSON use?

+

RFC 8259 section 8.1 says JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8. The media type is application/json.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →