json arrays. csv files.

convert JSON arrays of objects to CSV with auto-detected headers. choose delimiter, download as .csv file.

Delimiter:
json input
csv output

CSV output will appear here

What this tool does

Paste a JSON array of objects and download the spreadsheet-ready CSV. Headers come from the object keys; each row is one object. Handles escaping, nested values, and unequal keys across objects.

JSON and CSV describe different shapes

JSON can describe nested data — objects inside objects, arrays inside arrays, arbitrary depth. CSV cannot. CSV is a flat table: rows × columns, every cell a single value.

That mismatch is the entire interesting part of the conversion. The tool needs to flatten the JSON in a way the user expects, and there are a few strategies:

  • Stringify nested objects. A nested {"name": {"first": "A", "last": "B"}} becomes a single CSV cell containing the JSON string. Preserves the data but the spreadsheet sees it as opaque text.
  • Flatten with dotted keys. name.first and name.last become two columns. Most spreadsheet workflows want this.
  • Drop nested values entirely. Only top- level scalar fields make it into the CSV. Cleanest output but lossy if nested data was important.

This tool defaults to flattening with dotted keys, which is the right pick for most analytical / spreadsheet use cases.

The escape rules nobody remembers

CSV looks simple — comma-separated values, line per row — until you have a value that contains a comma, a newline, or a quote.

text
Original value:  Smith, John "JD"
CSV-escaped:     "Smith, John ""JD"""

The full rules:

  • Wrap the entire value in double quotes if it contains a comma, newline, or double quote.
  • Escape internal double quotes by doubling them ( " "").
  • Newlines inside quoted values are allowed in the CSV spec but break some downstream tools. Excel handles them fine; many CLI tools do not.

The tool applies these rules automatically. If you are looking at the output and seeing literal quotes around every value, that is correct — those values contained characters that required quoting.

Encoding gotchas

UTF-8 BOM for Excel. Excel on Windows does not auto-detect UTF-8 in CSV files unless they start with a UTF-8 byte-order mark (EF BB BF). Without it, accented characters and emojis become mojibake on open. The tool prepends the BOM by default; toggle it off if your downstream tool rejects it.

Delimiter regional differences. Some locales (much of Europe) default Excel to a semicolon delimiter rather than a comma, because their decimal separator is the comma. The tool defaults to comma; if Excel imports your CSV as one column, switch to semicolon.

Heterogeneous arrays

If your JSON array has objects with different keys — some have email, some do not — the tool collects the union of all keys as the header row, leaving missing values as empty cells. Same as a spreadsheet with sparse data.

Browser-only conversion

The conversion is pure JavaScript — parse the JSON, build the CSV string, hand it to the user as a Blob download. Your data, which might be exported records or an internal report, never leaves the browser tab.

What this tool does

Paste a JSON array of objects and download the spreadsheet-ready CSV. Headers come from the object keys; each row is one object. Handles escaping, nested values, and unequal keys across objects.

JSON and CSV describe different shapes

JSON can describe nested data — objects inside objects, arrays inside arrays, arbitrary depth. CSV cannot. CSV is a flat table: rows × columns, every cell a single value.

That mismatch is the entire interesting part of the conversion. The tool needs to flatten the JSON in a way the user expects, and there are a few strategies:

  • Stringify nested objects. A nested {"name": {"first": "A", "last": "B"}} becomes a single CSV cell containing the JSON string. Preserves the data but the spreadsheet sees it as opaque text.
  • Flatten with dotted keys. name.first and name.last become two columns. Most spreadsheet workflows want this.
  • Drop nested values entirely. Only top- level scalar fields make it into the CSV. Cleanest output but lossy if nested data was important.

This tool defaults to flattening with dotted keys, which is the right pick for most analytical / spreadsheet use cases.

The escape rules nobody remembers

CSV looks simple — comma-separated values, line per row — until you have a value that contains a comma, a newline, or a quote.

text
Original value:  Smith, John "JD"
CSV-escaped:     "Smith, John ""JD"""

The full rules:

  • Wrap the entire value in double quotes if it contains a comma, newline, or double quote.
  • Escape internal double quotes by doubling them ( " "").
  • Newlines inside quoted values are allowed in the CSV spec but break some downstream tools. Excel handles them fine; many CLI tools do not.

The tool applies these rules automatically. If you are looking at the output and seeing literal quotes around every value, that is correct — those values contained characters that required quoting.

Encoding gotchas

UTF-8 BOM for Excel. Excel on Windows does not auto-detect UTF-8 in CSV files unless they start with a UTF-8 byte-order mark (EF BB BF). Without it, accented characters and emojis become mojibake on open. The tool prepends the BOM by default; toggle it off if your downstream tool rejects it.

Delimiter regional differences. Some locales (much of Europe) default Excel to a semicolon delimiter rather than a comma, because their decimal separator is the comma. The tool defaults to comma; if Excel imports your CSV as one column, switch to semicolon.

Heterogeneous arrays

If your JSON array has objects with different keys — some have email, some do not — the tool collects the union of all keys as the header row, leaving missing values as empty cells. Same as a spreadsheet with sparse data.

Browser-only conversion

The conversion is pure JavaScript — parse the JSON, build the CSV string, hand it to the user as a Blob download. Your data, which might be exported records or an internal report, never leaves the browser tab.

more free tools

PDF utilities, image tools, developer helpers — all free, no signup.

Something wrong?