Skip to main content
AI JSONMedic

JSON to CSV Converter

To convert JSON to CSV, paste your JSON into the converter and copy or download the CSV. It works best with an array of objects: each object becomes a row and each key becomes a column header. The converter is free, needs no signup and runs in your browser. Broken JSON is repaired first.

Convert JSON to CSV

The Convert tab is set to CSV. Paste JSON into the left pane, click Upload to load a file, or drop the file on the editor; the CSV appears on the right with Copy and Download (the file is saved as data.csv). The conversion runs in your browser and nothing is sent to a server. There is no fixed size limit; very large files make the page slower. Auto-repair input is on by default, so a trailing comma or single quotes are fixed before converting.

How to convert a JSON file to CSV, step by step

  1. Open the file with Upload (or paste the JSON).
  2. Check that the top level is an array of objects, like the sample.
  3. Read the note under the output, if any: it tells you when nested values were written as JSON text.
  4. Click Download for data.csv, or Copy.

The sample in the converter gives exactly this output:

id,name,city,tags,active,note
1,Ada Lovelace,London,"[""math"",""code""]",,
2,Grace Hopper,,,true,
3,"Hopper, Grace",,,,"said ""hi"""

How the converter maps JSON to rows and columns

  • Rows: each object in the top-level array is one row. A single top-level object becomes one row.
  • Header: the union of all keys, in the order they first appear. A row without a key gets an empty cell.
  • Values: strings and numbers are written as they are, true/false as text, null as an empty cell.
  • Nested objects and arrays: written into the cell as JSON text, for example ["math","code"]. They are not flattened into extra columns.
  • Quoting: the delimiter is a comma. A field that contains a comma, a double quote or a line break is wrapped in double quotes, and quotes inside it are doubled, as RFC 4180 describes.
  • Line endings: rows end with a line feed (LF). RFC 4180 describes CRLF, so a strict CSV reader may need that setting.
  • Not convertible: an array of plain values ([1, 2]) or an empty array gives no CSV and a message instead.

Open the CSV in Excel

Download the CSV here and open data.csv in Excel or any spreadsheet program. The file is UTF-8 without a byte order mark. We have not tested every spreadsheet's import, so if names with accents or other non-ASCII characters look wrong after opening, check which text encoding the program used to read the file and choose UTF-8.

JSON vs CSV: when to use which

JSON, defined in RFC 8259, has objects, arrays, strings, numbers, true, false and null, so it can nest and keep types. CSV, described in RFC 4180 (a separate specification, not part of JSON), is lines of comma-separated text fields with an optional header line. Use JSON between programs and APIs; use CSV when the data is a table that people will open in a spreadsheet.

Choosing a JSON to CSV program

  • A browser converter like this one: nothing to install, good for a file you need once.
  • A script in the language you already use: better when the job repeats or when you need nested data flattened into columns your own way.
  • A spreadsheet's own import: possible in some programs; check your program's documentation for how it handles nested data.

The conversion guides include a longer walk-through of JSON to CSV, with flattening.

Fix JSON that will not convert

If the output pane says it cannot parse the JSON, switch to Repair to see what the engine changes, or Validate for the line and column of the first error. The full JSON repair tool and the validator do the same on their own pages.

Related JSON tools

The JSON converter also writes YAML, XML, SQL, TypeScript and JSON Schema; JSON to TypeScript and the schema generator have their own pages; format the JSON first if you want to read it; all tools are in JSON Studio. Terms are explained in the glossary and the basics in Learn JSON.

Frequently asked questions

Paste the JSON into the converter or click Upload, check the CSV output, then click Copy or Download. An array of objects works best: each object becomes a row and each key becomes a column.

JSON (RFC 8259) has objects, arrays, strings, numbers, true, false and null, so it can hold nested and typed data. CSV (RFC 4180) is flat rows of text fields, which suits tables and spreadsheets.

For a one-off job, a browser converter such as this one works without installing anything. For repeated or very large jobs, a short script in the language you already use is easier to automate.

Convert the JSON here, click Download to save data.csv, then open that file in Excel. The file is UTF-8 without a byte order mark; if accented characters look wrong after opening, check which encoding your spreadsheet program used to read it.

No. It is free, needs no signup, and the conversion runs in your browser.

The JSON Medic newsletter

One JSON error and its fix, weekly, plus new guides and tools. Free.

We send a confirmation link first. Unsubscribe with one click in any mail. See the privacy policy.

Related JSON tools