JSON to CSV Converter

Convert a JSON array to CSV, or CSV to JSON, with nested keys as columns.

Options
CSV

Examples

Questions

Why are the numbers in my JSON output in quotes?

CSV has no types, so every cell is text. By default each cell stays a string, exactly as written. Tick "Infer types" to read numbers, true, false and null as JSON values.

What happens to nested objects and arrays?

Nested objects become dot-path columns, so {"user":{"name":"Ada"}} becomes a column called user.name. Arrays are written as JSON text in one cell, because an array can be any length.

Why did a key with a dot in it convert strangely?

Dots mark nesting in column names, so a key like "a.b" looks the same as a nested key. Rename it first if it needs to survive a round trip.

How are commas, quotes and line breaks in a value handled?

As RFC 4180 says: the value is wrapped in double quotes, and any quote inside is doubled. Converting back reads it exactly.

What if a CSV row has a different number of columns than the header?

A shorter row is padded with empty cells. A longer row is an error, so no data is dropped. The message names the row.