devtools

JSON to CSV Converter

Convert a JSON array of objects to CSV with RFC 4180 quoting, custom delimiters, unioned columns, and JSON-stringified nested values. Private, no uploads.

Runs entirely in your browser — your data never leaves your device.

How to use JSON to CSV Converter

What it does & when you need it

You have JSON — an API dump, a database export, a log of events — and someone needs it in a spreadsheet. This converter turns a JSON array of objects into CSV you can open in Excel, Google Sheets, or Numbers. Each object becomes a row and each key becomes a column, with proper RFC 4180 quoting so a value containing a comma or a quote survives the trip intact. It all runs in your browser, so a customer list or a revenue export is never uploaded anywhere.

How to use

  1. Paste a JSON array of objects into input.json, press Sample for an example, or Upload a .json file.
  2. Pick the Delimiter that suits your target — comma for standard CSV, semicolon for many European locales, or tab for TSV.
  3. Copy the result from output.csv with Copy CSV or Ctrl/Cmd + Enter, then paste or save it as a .csv file.

Things worth knowing

The input must be an array of objects. Something like [{"id":1},{"id":2}] is exactly right. A single object or an array of bare numbers has no rows-and-columns shape, so the tool reports an error instead of guessing.

Columns are the union of every key. If some objects have keys others lack, each key still gets its own column in first-seen order, and any object missing that key gets an empty cell — records never shift into the wrong column.

Quoting follows the spec. Any field containing the delimiter, a double quote, or a newline is wrapped in quotes, and literal quotes are doubled (" becomes ""). Rows are joined with CRLF, which is what Excel expects.

Nested data is stringified. CSV is flat, so a nested object or array is written with JSON.stringify into a single cell. Flatten first if you want it spread across columns. Going the other way? Use CSV to JSON.

Examples

Records to spreadsheet rows

[{"id":1,"name":"Ada","active":true},{"id":2,"name":"Grace","active":false}]

A header row id,name,active followed by one CRLF-terminated line per object.

Fields that need quoting

[{"name":"Doe, John","quote":"He said \"hi\""}]

The comma and the embedded quotes force RFC 4180 quoting: "Doe, John" and "He said ""hi""".

Ragged keys across rows

[{"a":1,"b":2},{"a":3},{"c":9}]

Columns become the union a,b,c and every missing value is written as an empty cell.

Nested object is stringified

[{"id":1,"meta":{"tags":["x","y"]}}]

The meta object is JSON-stringified into a single quoted cell rather than split apart.

Frequently asked questions

What JSON shape does the converter expect?

A top-level JSON array whose items are objects, like [{"id":1,"name":"Ada"}]. Each object becomes a row and each key becomes a column. A single object at the top level, or an array of numbers or strings, is reported as an error rather than guessed into a layout.

How are columns chosen when objects have different keys?

The header is the union of every key across all objects, in the order each key is first seen. A row missing one of those keys gets an empty cell in that column, so ragged records stay aligned instead of shifting values into the wrong column.

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

It follows RFC 4180: any field containing the delimiter, a double quote, or a newline is wrapped in double quotes, and literal quotes are doubled (" becomes ""). Rows are joined with CRLF, the line ending the spec mandates, so the file opens cleanly in Excel and Sheets.

What happens to nested objects and arrays?

CSV is flat, so a nested object or array is serialized with JSON.stringify — a value of {"tags":["a"]} becomes that text in one quoted cell. Flatten or pick the fields you need first if you want nested data spread across separate columns.

Can I use a semicolon or tab delimiter, and is my data private?

Yes. Choose a semicolon for locales where the comma is a decimal separator, or a tab for TSV output; quoting adapts to whichever delimiter you pick. All conversion runs in your browser, so a JSON export full of customer records never leaves your machine.