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

RFC 4180 / START HERE

CSV records, before the details

CSV: Comma-Separated Values

CSV is a simple text format for rows and fields. This RFC documents a common CSV format and its media type; actual CSV files can vary.

The idea in one picture

  1. A table has rows and fields

  2. CSV writes them as text

  3. Another tool imports the table

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

Spreadsheets and other programs need a basic interchange format for tabular data, including rules for commas and quotes inside fields.

A familiar example

You export a contact list from a spreadsheet and import its rows into another application.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. Records and fieldsCSV organizes records as rows with comma-separated fields.
  2. Optional header rowThe first row may contain names for the fields.
  3. Quoted fieldsDouble quotes keep commas or line breaks inside one field.
  4. Escape double quotesA quote inside a quoted field is represented by two consecutive double quotes.
  5. Media type and application limitstext/csv describes a textual interchange format, not a complete typed schema.
Start with chapter one →

This introduction explains RFC 4180 (2005). Read the original RFC ↗