JSON to CSV Converter
Paste a JSON array of objects on the left. Get a clean CSV on the right. Nested objects are flattened, and you can copy or download.
Try one row before exporting a whole response
A short sample makes it easier to spot a column problem before you convert a long API response. Paste this input:
[{"order_id":"00128","total":19.5,"customer":{"name":"Ana"},"paid":true}]
Press Convert. The output is:
order_id,total,customer.name,paid 00128,19.5,Ana,true
The order ID keeps its leading zeros in the CSV text, but a spreadsheet may automatically turn that cell into the number 128. When you import it, mark identifier columns as text rather than letting the spreadsheet guess their types. The nested customer name became the customer.name column, and the JSON boolean became the text true.
CSV stores cells, not JSON types. Keep the original response when you need to distinguish null from a missing field or recover an array without parsing the CSV cell again.
How the conversion works
This page reads JSON and writes a spreadsheet-shaped text file: one header row, then one data row per object, cells separated by commas. The header is the union of every flattened key, in the order those keys first appear. A row that lacks a key gets an empty cell, so uneven objects still line up under the same columns.
A single object (not wrapped in an array) is treated as a one-row table. An empty array is rejected. Nested objects are flattened with dots: user.city becomes its own column. Arrays, including arrays of objects, are not exploded into extra rows. They are stored as a compact JSON string inside one cell so the value is not silently dropped.
Cells that contain a comma, a quote, or a line break are quoted and internal quotes are doubled, which is the usual CSV convention. The download uses CR+LF between rows so Excel and most text tools open the file without gluing rows together.
Worked example: a contact export with quotes, nulls and line breaks
A support tool exports contacts as JSON, and someone in operations wants a spreadsheet. The export is uneven: one contact has a nickname in quotes and an empty plan, the other has a multi-line note. Paste this and press Convert:
[{"id":101,"name":"Ana \"Nina\" Costa","active":true,"plan":null,"address":{"city":"Recife","zip":"50030-230"},"tags":["vip","beta"]},
{"id":102,"name":"Bruno Lima","active":false,"address":{"city":"Porto Alegre"},"notes":"Prefers email\nafter 6pm"}]
Output:
id,name,active,plan,address.city,address.zip,tags,notes 101,"Ana ""Nina"" Costa",true,,Recife,50030-230,"[""vip"",""beta""]", 102,Bruno Lima,false,,Porto Alegre,,,"Prefers email after 6pm"
Readout: Rows 2, Columns 8. Reading it column by column: the name with quotes is wrapped and its inner quotes are doubled. plan is empty for Ana because it was null, and empty for Bruno because the key was missing, so the CSV cannot tell those two cases apart. The address became two dotted columns. The tags array stayed as JSON text in one cell. Bruno's note keeps its line break inside quotes, so a spreadsheet shows it as one cell with two lines, while a script that splits the file on newlines would wrongly see an extra row.
How to use Convert, Copy, and Download
- Paste a JSON array of objects (or one object) into the left pane labeled
JSON input. The header tracks character count. Nothing converts until you ask. - Click
Convert. The right pane labeledCSV outputfills with the table. Status becomesConverted. Rows is the number of objects, Columns is the number of flattened keys, Size is the UTF-8 byte length of the CSV string. - Click
Copy resultto put that string on the clipboard (the button readsCopiedbriefly). Or clickDownload .csvto save a local file namedfieldkit-export.csv. The file is built with a Blob in this tab. It is not uploaded anywhere. Clearwipes both panes and resets the readout toWaiting for input.
A parse error empties the output and puts Invalid JSON plus the parser message in Status. An empty array sets Rows and Columns to 0 and says there is nothing to convert. Newline-delimited JSON (one object per line, no wrapping array) is not a single JSON value, so it fails parse. Wrap the lines in [...] and add commas first.
Three smaller cases
A flat list. Input:
[{"name":"Ada","role":"engineer"},{"name":"Grace","role":"admiral"}]
Output (two data rows plus a header):
name,role Ada,engineer Grace,admiral
Readout: Rows 2, Columns 2.
Nested objects become dotted columns. Input:
[{"id":7,"user":{"name":"Ada","city":"London"}}]
Output:
id,user.name,user.city 7,Ada,London
There is no user column holding a blob of JSON. The inner keys were lifted.
Uneven keys and a comma inside a value. Input:
[{"sku":"A-1","note":"small, cheap"},{"sku":"B-2","qty":3}]
Output:
sku,note,qty A-1,"small, cheap", B-2,,3
The header is sku,note,qty because those keys appeared in that order. The first row has an empty qty. The second has an empty note. The note that contains a comma is wrapped in quotes. true, false, and numbers are written as their obvious text. null becomes an empty cell, not the word null.
An array value such as "tags":["math","code"] becomes the cell ["math","code"], quoted and with doubled inner quotes because of the commas and quote characters.
Common mistakes
- Pasting a single object and expecting multiple rows. You get one row. The records have to be an array.
- Hoping a nested array of objects will become extra rows. Those stay in one cell as JSON. Flatten or unwrap them before converting if you need one row per item.
- Opening the downloaded file in Excel and seeing one column because the file was double-clicked on a machine that wants semicolons. The file is comma-separated. Use Data, From Text, and pick comma if needed.
- Assuming the CSV remembers that a value was a string, a number or null. It is just text. Check identifiers and dates after importing.
- Opening untrusted values in a spreadsheet without checking cells that begin with
=,+,-or@. This tool does not neutralize spreadsheet formulas.
When a spreadsheet is the next step
Convert when an API gave you an array of records and you want to filter, chart, or share them with someone who lives in a spreadsheet. It is also a quick way to see which keys actually appear across a messy payload, because the header lists every one.
- Turning a list of users, orders, or events into a file you can open in Excel or Sheets
- Checking that optional fields really are optional (empty cells) before you write an importer
- Handing a flattened view of nested JSON to someone who does not want to read braces
Out of scope
It does not turn CSV back into JSON. It does not let you pick a delimiter, a quote character, or a column order. It does not add a UTF-8 BOM or neutralize formula-like cell values. It does not stream a multi-megabyte file; the whole document lives in the text area. It does not follow JSON references or merge two arrays. See the JSON to CSV guide for safer spreadsheet imports, large numbers, leading zeros and formula injection.
Your data stays in the tab
Parse, flatten, escape, copy, and the local download all happen in this tab. The JSON is never sent to a server. Closing the tab clears it.
JSON to CSV questions
What shape of JSON works best?
An array of objects, with each object representing one row. A single object also works and produces one data row. The header combines the keys found across every row.
What happens to nested objects and arrays?
A nested object becomes dotted columns, such as customer.name. An array stays together as a JSON string in one cell. It does not create extra rows.
Why did an empty or null field become blank?
null and a missing key both produce an empty cell. The CSV does not retain the difference, so keep the original JSON if that distinction matters.
Why did my identifier lose its leading zeros?
The converter writes the original text, but spreadsheet auto-detection can treat 00128 as a number. Import that column as text.
Is the JSON uploaded?
No. Parsing, conversion and download all run in this browser tab. Fieldkit does not receive the JSON or the CSV for processing.