To convert JSON to CSV, paste an array of objects into the Input box or upload a .json file, then select Convert Data. Each object becomes a row and each key becomes a column; nested objects are flattened into columns like address.city. Select Download to save the .csv file, which opens in Excel or Google Sheets.
How to convert JSON to CSV
- Add your data. Paste JSON or CSV into the Input box, or choose Select File to load a .json, .csv or .txt file. Load JSON Sample shows the expected shape.
- Check the direction. Conversion is set to Auto detect: valid JSON is converted to CSV and anything else is read as CSV. Pick JSON → CSV or CSV → JSON to force it.
- Set the format. Choose the CSV Delimiter (Auto detect reads it from pasted CSV and writes commas), and leave Flatten Nested JSON on Yes to give each nested field its own column.
- Convert and save. Select Convert Data (Ctrl+Enter), then Copy Output or Download. The file keeps your original file name with a .csv or .json extension.
What the JSON to CSV converter does with nested data
CSV is a flat table, and JSON can nest objects and arrays. The converter needs one row per record, so it expects either an array of objects or a single object (which becomes one row). The columns are every key found across all objects, in the order they first appear. A record that lacks a key gets an empty cell.
With Flatten Nested JSON set to Yes, this input:
[
{"id": 1, "name": "Ali", "address": {"city": "Lahore"}, "skills": ["SQL", "Go"]},
{"id": 2, "name": "Sara", "address": {"city": "Karachi"}}
]becomes this CSV:
id,name,address.city,skills
1,Ali,Lahore,"[""SQL"",""Go""]"
2,Sara,Karachi,Nested objects turn into dot-notation columns (address.city). Arrays are kept as JSON text inside one cell, because a list of any length can't map cleanly onto fixed columns. Set Flatten to No, stringify nested values to keep the whole address object as JSON text in a single column instead.
How CSV escaping works
The output follows the quoting rules of RFC 4180, the common CSV format. A field is wrapped in double quotes when it contains the delimiter, a double quote or a line break, and any quote inside it is doubled. That's why ["SQL","Go"] above appears as "[""SQL"",""Go""]". This converter also quotes fields that contain a semicolon, tab or pipe, so the file still parses if someone opens it with a different delimiter.
| Delimiter | When to use it |
|---|---|
| Comma (,) | The default for most tools, databases and Google Sheets |
| Semicolon (;) | Excel in regions that use a comma as the decimal mark, such as much of Europe |
| Tab | Tab-separated values (.tsv), safe for text full of commas |
| Pipe (|) | Log exports and legacy systems |
Rows end with a line feed (\n). The file is UTF-8 without a byte order mark, so if Excel shows garbled accents after a double-click, import it with Data › From Text/CSV and set File Origin to 65001: Unicode (UTF-8).
Convert CSV to JSON
Paste CSV and select Convert Data to get a JSON array with one object per row. CSV Header Row decides the keys: Auto detect guesses whether the first row holds names, First row is header forces it, and No header row names the keys column_1, column_2 and so on. Quoted fields can contain commas, doubled quotes and line breaks.
zip,name,active
02134,"Smith, J",trueconverts to:
[
{
"zip": 2134,
"name": "Smith, J",
"active": true
}
]Values are typed: true, false and null become JSON literals, and plain numbers become numbers. That last rule drops leading zeros, so ZIP code 02134 turns into 2134. Fix those cells in the JSON output by putting them back in quotes. Also set CSV Delimiter to match your file before converting; a semicolon file read with Comma comes out as one column per row.
Other ways to convert JSON to CSV
If you work in a terminal, jq can do it for flat arrays: jq -r '(.[0] | keys_unsorted) as $k | $k, (.[] | [.[$k[]]]) | @csv' data.json. In Python, pandas.json_normalize(data).to_csv("out.csv", index=False) flattens nested objects the same way, with dot-separated column names. This page is faster for one-off files and keeps the data on your device, since nothing is uploaded.
If the JSON won't convert, the status reads "Invalid input or parse error". Paste it into the JSON formatter to find the exact line with the problem. For config files rather than tables, the JSON to YAML converter is the better fit.
Frequently asked questions
How do I convert JSON to CSV for Excel?
Paste your JSON array, select Convert Data, then Download. Open the .csv in Excel; if accented characters look wrong, use Data › From Text/CSV and choose UTF-8. In regions where Excel expects semicolons, set CSV Delimiter to Semicolon first.
Can it convert CSV to JSON too?
Yes. Paste CSV and Auto detect converts it to a JSON array of objects, using the header row as keys. You can also force the direction with the Conversion menu.
What happens to nested objects and arrays?
Nested objects become columns with dot-separated names, such as address.city. Arrays are written into a single cell as JSON text.
Why do I get an error converting my JSON?
Either the JSON has a syntax error, or the top level is a plain string or number. The input must be an object or an array, usually an array of objects.
Why did my ZIP codes lose their leading zeros?
When converting CSV to JSON, values that look like numbers become JSON numbers, and numbers can't keep leading zeros. Edit those values in the output to wrap them in quotes.
Is my data uploaded during conversion?
No. The converter runs entirely in your browser, so the file stays on your device.