How to use the JSON to CSV converter
- 1Paste JSON into the JSON box, press Open file, or press Example. An array of objects, a single object, an object holding one array, and JSON Lines are all accepted.
- 2Pick a Delimiter (comma, semicolon, tab or pipe) and how to handle Arrays inside records.
- 3Leave Header row and Excel-friendly download ticked if the file is going to Excel. Tick Neutralize formulas for data from untrusted sources.
- 4Check the Table preview, then press Copy or Download (
data.csv, ordata.tsvfor tabs).
Example
[{"id":1,"name":"Ada","address":{"city":"London"},"tags":["math","code"]},
{"id":2,"name":"Grace","address":{"city":"New York"},"tags":[]}]id,name,address.city,tags 1,Ada,London,math; code 2,Grace,New York,
Arrays inside records: Join values. With One column per item, tags becomes tags.0 and tags.1 columns instead.
Flattening nested objects
CSV is a flat table, so nested objects are spread into columns named by their path: {"address": {"city": "London", "zip": "N1"}} becomes the columns address.city and address.zip. Nesting can go as deep as you like (order.customer.address.city).
The column list is the union of the keys found in all records, in the order they first appear. A record that lacks a key gets an empty cell, so records with different shapes still line up. An empty object becomes one empty cell, so the column isn't lost.
Arrays inside records
Arrays have no natural place in a table, so Arrays inside records gives three choices:
| Option | "tags": ["math", "code"] becomes |
|---|---|
| Join values with "; " | one tags column: math; code |
| One column per item | tags.0 = math, tags.1 = code |
| Keep as JSON text | one tags column: ["math","code"] |
Joining is easiest to read. One column per item suits short, fixed-length lists such as coordinates. Keeping JSON text is lossless and best when the CSV will be read back by a program. Arrays of objects are always kept as JSON text when joining, since joining them would lose their structure.
Delimiters and Excel compatibility
The output follows RFC 4180: fields containing the delimiter, quotes or line breaks are wrapped in double quotes, and quotes inside them are doubled ("Said ""hello"""). Lines end with CRLF.
Excel opens a CSV with the list separator of your system's region settings. In much of Europe that is a semicolon, so a comma-separated file lands in one column; choose Semicolon for those users. Excel-friendly download adds a UTF-8 byte order mark, without which Excel on Windows shows é as é. Neutralize formulas prefixes cells that start with =, +, - or @ with an apostrophe, so a malicious value can't run as a spreadsheet formula.
Large files
Conversion runs in your browser and updates as you type, with a longer pause for inputs over 200,000 characters. Tens of thousands of records convert in well under a second on a laptop. Open file accepts .json, .jsonl and .ndjson. JSON Lines (one JSON object per line, common in log exports and BigQuery) is detected automatically when the input isn't a single JSON value; the footer says "read as JSON Lines". If the JSON is invalid, the error shows the exact line and column, as in the JSON viewer.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
