JSON to CSV Converter Online

Convert JSON arrays to CSV instantly. Supports multiple delimiters and download.

Delimiter:
JSON INPUT
CSV OUTPUT

When a JSON to CSV converter is the right tool

APIs and scripts often give you an array of objects, but a spreadsheet wants a CSV file. This page is for that direction only. You paste a JSON array, pick a delimiter, and get a table you can copy or download as output.csv. The output updates as you type.

If you also need to turn CSV back into JSON, or you only have a simple comma-separated file, use the CSV ↔ JSON converter. That page reads and writes commas only, and when going from JSON to CSV it uses the keys of the first object alone.

Use cases

Exporting an API list to a spreadsheet

Paste the array, leave the delimiter on comma, and download the file. Load Sample pastes a short list of users with id, name, email, and role if you want to try that first.

Handling objects that do not all have the same keys

The header is built from every object, so a field that appears only on some rows still gets a column. Missing values are left blank. That is the main reason to use this page instead of the two-way converter when your documents are uneven.

Writing a semicolon- or tab-separated file

Some locales and tools expect ; or a tab rather than a comma. Choose the delimiter before you copy or download. The quoting rules follow that delimiter, so a field that contains a semicolon is quoted when semicolon is selected.

How conversion works

The input is parsed as JSON. It must be a non-empty array. The page walks every object to collect keys, writes a header row, then one data row per element. Values are converted to strings; null becomes an empty cell. You can copy the text or download it. There is no type detection, no flattening of nested objects, and no reverse (CSV → JSON) mode.

Example — a uniform array becomes a comma-separated table
[
  { "id": 1, "name": "Alice", "role": "admin" },
  { "id": 2, "name": "Bob", "role": "user" }
]

id,name,role
1,Alice,admin
2,Bob,user

Numbers are written as their string form (1, not "1" unless the JSON value was already a string). The header order follows the keys of the first object, then any extra keys found later.

Example — keys from later rows still appear as columns
[
  { "name": "Alice", "email": "alice@example.com" },
  { "name": "Bob", "role": "user" }
]

name,email,role
Alice,alice@example.com,
Bob,,user

Alice has no role, Bob has no email, and both columns are present. On the two-way CSV ↔ JSON page, Bob's role would have been dropped because it is not on the first object.

What this tool does not do

It does not convert CSV back to JSON, flatten nested objects, or guess number types beyond what JSON already encoded. Nothing is sent to a server. To tidy the JSON first, use the JSON Formatter. To compare the CSV with another export, use CSV Diff.

How to use JSON to CSV

  1. Paste a JSON array of objects into the input, or use Load Sample.
  2. Choose a delimiter: comma, semicolon, tab, or pipe.
  3. Copy the CSV, or choose Download .csv to save it as output.csv.
  4. Use Clear to empty the input.

Frequently asked questions

What JSON shape does this page accept?

A JSON array of objects. The text is parsed with JSON.parse. A single object, an array of arrays, or an empty array is rejected (an empty array shows “Array is empty.”). Invalid JSON shows a short error that includes the beginning of the input. Comments and trailing commas are not accepted.

How are columns chosen?

The header is the union of keys from every object, in the order the keys are first seen. A key that appears only on a later row still becomes a column; earlier rows leave that cell empty. This is different from the CSV ↔ JSON page, which uses only the keys of the first object.

What delimiter options are available?

Comma (the default), semicolon, tab, or pipe. The same delimiter is used in the header and in every data row. Cells that contain the delimiter, a quote, or a line break are wrapped in quotes, and quotes inside a cell are doubled.

What happens to nested objects, arrays, or missing values?

null and undefined become empty cells. A nested object or array is written with JavaScript’s default string conversion, which for a plain object is [object Object] and is rarely what you want. Flatten the JSON first if you need nested fields as columns. A row that is not an object is written as a line of empty cells.

How does Download .csv work?

It builds a Blob from the current output and saves it in the browser as output.csv. Nothing is uploaded. Copy does the same text onto the clipboard instead of saving a file.

Is my JSON sent to a server?

No. Conversion runs in your browser as you type. Closing the tab discards what you pasted. Do not paste arrays that contain personal data or secrets if you would not be comfortable with them sitting in memory on this device.

Is there a file size limit?

There is no server-imposed limit, because nothing is uploaded. A few thousand rows is usually comfortable. A very large array can make the tab feel slow; in that case, convert a smaller excerpt or use a local tool.

Related tools and guides

References

  • RFC 8259 is the JSON format this page accepts. The input must be a single JSON array.
  • RFC 4180 describes quoted CSV fields. This page quotes cells when it writes CSV, including when you choose a delimiter other than a comma.