JSON to CSV: Delimiters, Headers and Flattening Nested Structure

Open Tool CSV ↔ JSON Converter

The fundamental difference

JSON is hierarchical: objects nest arrays and objects, and the same key can carry different types across elements. CSV is a flat grid of strings. Conversion is therefore lossy — JSON to CSV must flatten, joining nested fields into dotted column names and splitting arrays by index or serialising them; CSV to JSON yields flat objects where numeric strings stay strings.

Steps

  1. Paste a JSON array, such as the sample of objects with a name and a price.
  2. Choose comma, semicolon or tab; commas inside fields require quoting.
  3. Tick header row usage in both directions.
  4. Flip direction with the arrow and convert, or load the sample.
  5. Copy, download, or clear.

Choosing a delimiter

Commas are universal but demand quoting whenever a field contains one, or columns shift. Semicolons suit locales where the decimal separator is a comma, avoiding ambiguity. Tabs rarely occur naturally and handle dirty data, though some tools collapse them as whitespace. Whatever the delimiter, inspect quotes and newlines: a newline inside a field must be quoted or it starts a new row.

Handling nesting

Flat objects map straight to columns. Nested objects join with dots so readers see the hierarchy. Arrays are the hard case: homogeneous objects split into indexed columns, scalars serialise into one cell with a separator that must not clash with the delimiter. Deep nesting multiplies columns, so exports usually carry key fields and keep the full structure as JSON elsewhere.

Common problems

Unquoted delimiters inside fields, shifting columns from that row onward. Losing type information, since CSV stores text only. Stripping leading zeros from phone numbers and codes unless imported as text. Mojibake when Excel opens a UTF-8 file without the import wizard. Null collapsing into empty cells and returning as empty strings, erasing meaning. And ragged arrays producing many empty columns after splitting.

Choosing the format:CSV wins for human reading, spreadsheet import and bulk reconciliation; JSON for programmatic use, hierarchy and varied types. At hundreds of thousands of rows, CSV parses with less memory but sacrifices precision and typing. Where types and nesting matter, consider typed serialisation or exporting only needed columns. Any import feature deserves a downloadable template and field documentation rather than guesswork.

⏫︎