Visual RFC.
ALL RFCs / RFC 4180
Read the RFC ↗
RFC 4180 / MECHANISM GUIDE

Records and fields

01

CSV organizes records as rows with comma-separated fields.

RFC 4180 · § 2EXAMPLE
3 / 3
03
Preserve field data

Do not silently strip meaningful spaces.

Records and fieldsCSV organizes records as rows with comma-separated fields.Records and fieldsAda,12Lin,15" Ada",12Field 1 contains a leading space:" Ada" → space + Ada

Key idea: Records use CRLF in the documented common format; the final record may omit its ending CRLF.

Terms

Look up a term in the glossary ↗

Rules & examples
  • Records use CRLF in the documented common format; the final record may omit its ending CRLF.
  • Each line should contain the same number of fields.
  • Spaces are part of field data rather than automatically ignorable.

Examples are illustrative. Consult the linked RFC and its errata for implementation details.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

What changed
RFC 4180 common CSV formatRFC 7111 §3

The later update defines row, column, and cell URI fragments for text/csv. It does not replace the CSV field quoting rules.

Read the updated RFC section ↗

All chapters in RFC 4180

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗