How to use JSON to CSV

  1. Paste your JSON into the Input JSON editor, or click Select files to load it from a file.
  2. In the Delimiter field, type the character that separates values. The default is a comma. If the field is empty, the output shows 'No CSV delimiter.'
  3. Under String Quoting, choose Auto (recommended) to quote only the cells that need it, or Always quote to wrap every cell in double quotes.
  4. Under Headers, keep Include header row checked to put the column names in the first row, or uncheck it to output data rows only.
  5. The Output CSV updates as you type. Click Copy to clipboard, or click Download to save it as a .csv file.

Examples

Nested object to columns

[{"id":1,"user":{"name":"Ana","tags":["a","b"]}}] produces the header id,user.name,user.tags[0],user.tags[1] and the row 1,Ana,a,b.

Rows with different keys

[{"name":"Alice","age":30},{"name":"Bob","city":"Paris"}] produces name,age,city followed by Alice,30, and Bob,,Paris. Missing keys become empty cells.

JSON Lines with a semicolon delimiter

With Delimiter set to ; the two lines {"a":1} and {"a":2,"b":"x;y"} produce a;b, then 1; and 2;"x;y". The last cell is quoted because it contains the delimiter.

Good to know

  • Nested objects are flattened into dot-notation columns (address.city) and arrays into indexed columns (tags[0], tags[1]). Columns appear in the order their keys are first found.
  • Input can be a single object, an array of objects, or JSON Lines (one JSON value per line). A bare value such as 42 is rejected, and an array of plain values such as [1,2,3] returns 'No data found in the provided JSON.'
  • Missing keys and null values become empty cells. Rows are separated by CRLF line breaks, and double quotes inside a cell are escaped by doubling them.
  • The JSON input editor (Monaco) is downloaded from cdn.jsdelivr.net when the editor loads. The conversion itself runs as JavaScript in the page.

Frequently asked questions

Can I convert JSON Lines (NDJSON)?

Yes. If the input is not a single valid JSON document and has more than one non-blank line, each non-blank line is parsed as its own JSON value and becomes one row. Blank lines are ignored, and a line that fails to parse is reported with its line number.

Which cells are quoted in Auto mode?

Only cells that contain the delimiter, a double quote, or a line break (CR or LF). Always quote wraps every cell in double quotes, including the header row.

Why do I get 'No data found in the provided JSON.'?

This message appears when no row has any value to output. For example, every object is empty ({}), or the array holds plain values such as numbers or strings instead of objects.

More JSON Tools