FIELD NOTE 04 / DATA FORMATS
CSV quoting and JSON arrays
CSV is compact, but a comma can mean either “next column” or part of a value. The quote rules decide which. JSON makes types explicit but still needs a predictable row structure.
When a CSV field needs quotes
RFC 4180 describes a common CSV format in which fields containing commas, line breaks or double quotes are enclosed in double quotes. A quote inside a quoted field is doubled. For example:
name,city,note
Asha,"New York, NY","said ""hello"""The second field stays one city value even though it contains a comma. The doubled quote in the note represents one literal quotation mark. The RFC is informational and describes a common format; real exports may vary in delimiters, line endings, character encoding and conventions.
Headers become object keys
When converting CSV into a JSON array of objects, the first row can be treated as the property names. Each later row supplies values for those properties. Since CSV cells are text, the converter keeps them as strings rather than guessing that 0012 means the number 12 or that 03/04/05 is a particular date.
Blank or duplicate headers are ambiguous object keys. Measureline rejects them instead of silently overwriting one column. Entirely empty rows are ignored; commas in a non-empty row still define empty cells.
JSON back to CSV
The reverse conversion uses an array of objects and writes a header row from the object keys. If an object contains an array or nested object, it is serialized into a JSON string inside one CSV cell. Missing properties become empty cells. If you need strict type preservation, schema validation or a specific spreadsheet dialect, review the output before importing it. Spreadsheet apps may evaluate cells beginning with =, +, - or @ as formulas, so inspect untrusted data before opening a converted CSV.
Local processing and limits
This page uses browser code to parse and format the text you paste. It has no file picker, upload endpoint or server-side conversion API. Inputs over 1 MB are rejected to keep processing bounded. Do not paste secrets into a shared or public computer; browser extensions, clipboard tools and device management software are outside this page’s control.
Try the converter
Open the CSV ↔ JSON converter and start with the sample to see how quoted commas and quotes are represented.