Skip to content

Working with CSV and tabular data

Quoting rules, delimiters, type loss, and how to move safely between CSV rows and JSON records.

CSV is the most widely supported data format and the least specified one. There is no single standard for delimiters, quoting, escaping, or line endings, so "valid CSV" really means "CSV that the next tool in the chain happens to accept".

Quoting is where files break

Any field containing a comma, quote, or newline must be quoted, and embedded quotes are doubled. Exports that concatenate strings without quoting produce files that look fine until one address contains a comma and every later column shifts by one.

Everything is text

CSV carries no types. Importers guess, which is how leading zeros vanish from postcodes, long identifiers become floating-point numbers, and dates reformat according to a locale nobody chose. Treat identifier columns as strings explicitly and validate after import.

Flattening JSON needs a convention

Nested objects have no natural column representation. Pick a separator such as dot notation, decide whether arrays become joined strings or extra rows, and document the choice so two exports of the same data agree.

Clean before you convert

Deduplicate and normalise whitespace first. Rows that differ only by a trailing space survive deduplication and then appear as two distinct records downstream.

Convert both directions

Move between formats with JSON CSV Converter, remove repeats with Line Deduper, and read JSON vs CSV for the structural trade-offs.

Try related tools

Keep exploring