How to convert JSON to CSV
- Paste your JSON into the left box, drop a file onto it, or press Upload. Press Sample to try it with example data. If you're not sure the JSON is valid, format and validate the JSON first.
- The CSV appears on the right as you type. Pick the delimiter (comma, semicolon or tab) and how arrays are written.
- Press Download .csv to save the file, or Copy to paste it into a spreadsheet or an email.
Each object in the array becomes one row and each key becomes a column heading. Values keep their text form: true, false and numbers are written as they are, and null becomes an empty cell.
Nested JSON to CSV
CSV is flat, so nested objects are flattened into dot-notation columns: {"address": {"city": "London"}} becomes a column called address.city. The columns are the union of the keys in all rows, so a key that only some objects have still gets a column. This input:
[
{ "id": 1, "name": "Ada", "address": { "city": "London", "zip": "W1" }, "tags": ["math", "poetry"] },
{ "id": 2, "name": "Grace", "email": "[email protected]", "address": { "city": "New York" }, "tags": [] }
]converts to this CSV with the default settings (arrays as JSON text):
id,name,address.city,address.zip,tags,email
1,Ada,London,W1,"[""math"",""poetry""]",
2,Grace,New York,,[],[email protected]
Grace has an email that Ada doesn't, so Ada's cell is empty, and Grace has no address.zip. With Arrays: as columns, each array item gets its own numbered column instead:
id,name,address.city,address.zip,tags.0,tags.1,email
1,Ada,London,W1,math,poetry,
2,Grace,New York,,,,[email protected]
Untick Flatten nested objects to keep each nested object as JSON text in a single cell. To see how deep a document goes before choosing, open it in the JSON viewer and expand the tree.
Which JSON shapes work
- An array of objects: the usual case, one row per object.
- An API response with the rows inside a property, like
{"results": [...]}: if exactly one property holds an array of objects, it is used as the rows and the tool tells you which one. - An array of arrays: already a table, so the rows are written as they are, with no header added.
- A single object: one row. An array of plain values goes into one column called
value.
For example, this paged API response
{ "page": 1, "results": [{ "sku": "A1", "price": 9.5 }, { "sku": "B2", "price": 12 }] }gives one row per item in results, and the page field is left out:
sku,price
A1,9.5
B2,12
How the CSV is quoted
The output follows RFC 4180, the CSV standard: a field is wrapped in double quotes when it contains the delimiter, a double quote or a line break, and a double quote inside a field is doubled. Lines end with CRLF, which Excel, Google Sheets, LibreOffice and databases all read. A product called Desk, oak with an 18" deep note comes out as:
product,note,qty
"Desk, oak","18"" deep",2
To go the other way, the CSV to JSON converter reads these quoted fields back into the same values.
Open the CSV in Excel
Searching for a JSON to Excel converter? Excel opens CSV files directly, so converting JSON to CSV is the quickest route:
- Keep Excel-friendly download (UTF-8 BOM) ticked. Without the BOM, Excel may show accented letters as
é. - In countries where Excel uses a comma for decimals (much of Europe and Latin America), choose the semicolon delimiter so the columns split correctly.
- Double-click the downloaded file, or in Excel use Data → From Text/CSV to choose column types. Set ID and ZIP code columns to Text so leading zeros are kept.
- Save as .xlsx if you need a workbook.
Convert JSON to CSV in Python, jq or PowerShell
For scheduled jobs or very large files, a few lines of code do the same flattening:
- Python (pandas):
pd.json_normalize(data).to_csv("out.csv", index=False)flattens nested objects intoaddress.citycolumns, like this tool. - jq:
jq -r '(map(keys_unsorted) | add | unique) as $k | $k, (.[] | [.[$k[]]]) | @csv' data.jsonwrites a header from all keys, then one row per object (top-level keys only). - PowerShell:
Get-Content data.json | ConvertFrom-Json | Export-Csv out.csv -NoTypeInformationworks for flat objects; nested ones come out as@{…}text.
Frequently asked questions
Can I convert JSON into CSV?
Yes, as long as the JSON describes rows: an array of objects is the ideal shape, where each object becomes a row and each key becomes a column. Nested objects are flattened into dot-notation columns such as address.city, and arrays are kept as JSON text in one cell or spread over indexed columns.
How can I convert a JSON file to a CSV file online?
Press Upload and choose your .json file (or drag it onto the input box), check the preview, then press Download .csv. The file is read by your browser and converted on your device, so it is never uploaded to a server.
How can I convert a large JSON file to CSV?
Upload it here: files of several megabytes convert in a second or two. Above 1 MB the tool stops converting on every keystroke and waits for you to press Convert, and the output box shows only the first 1 MB while Copy and Download include everything. For files of hundreds of megabytes, a script (pandas or jq, shown above) is the better tool.
Which is better, JSON or CSV?
It depends on the data. CSV is a flat table: compact, and it opens directly in Excel, Google Sheets and databases. JSON can hold nested objects, lists and types (numbers, true/false, null), so it is what APIs and config files use. Convert JSON to CSV when you need a spreadsheet or an import file; keep JSON when the structure matters.
How do I convert JSON to Excel?
Convert the JSON to CSV here, keep "Excel-friendly download" ticked, then open the downloaded .csv in Excel (double-click, or Data → From Text/CSV). Save it as .xlsx from Excel if you need a workbook. If your Excel uses a comma as the decimal separator, pick the semicolon delimiter first.
What happens when some objects have keys that others do not?
Every key found in any row becomes a column, in the order the keys first appear. Rows that do not have a key get an empty cell in that column, so no data is dropped.
Why do I get columns like tags.0 and tags.1?
That is the "Arrays: as columns" option: each array item gets its own numbered column. Choose "Arrays: as JSON text" to keep the whole array in one cell instead, for example ["math","poetry"].
Why does Excel show strange characters like é in my CSV?
Excel assumes an old encoding unless the file starts with a UTF-8 byte order mark (BOM). The "Excel-friendly download" option adds it, so é, ü, 東京 and emoji display correctly. Most other tools ignore the BOM.
Is my JSON uploaded or stored?
No. The conversion runs in JavaScript in your browser, and nothing you paste or upload is sent to a server or saved. Only your option choices, such as the delimiter, are remembered on your device.