⇠

JSON to CSV

Convert an array of JSON objects into CSV

JSON to CSV — what it does

Convert an array of JSON objects into CSV, with the object keys becoming the header row and each object a data row. It is the bridge between systems that speak JSON and the spreadsheets, finance tools and importers that only speak tables.

When this tool helps

  • Getting an API export into a spreadsheet for analysis or a colleague's review.
  • Preparing JSON data for a system that only accepts CSV uploads.
  • Producing a human-readable table from a payload for a report.

How to use it

  1. Provide the JSON array of objects.
  2. Process the conversion.
  3. Review the resulting table.
  4. Download the CSV file.

Accuracy, limits, and good practice

  • Objects with differing keys produce a union of columns, so records missing a field simply have an empty cell there.
  • Nested objects have no natural column; flatten the JSON first so each nested value gets its own dotted column name.
  • Values containing commas, quotes or line breaks are quoted in the output, keeping the file parseable everywhere.
  • Check the column list before importing anywhere: a payload where one record carries an extra field silently adds a column the destination may not expect.

Frequently asked questions

What if my JSON is a single object, not an array?

Wrap it in an array, or extract the array you want with the JSON path extractor first.

How are nested arrays handled?

They have no tabular equivalent. Flatten the document first, which turns array elements into indexed columns.

Can I get an Excel file directly?

Yes, the JSON to Excel tool writes an XLSX workbook, with optional flattening of nested objects.

What happens to boolean and null values?

They become their text representations, so a receiving system needs to interpret true, false and empty strings itself.

Related tools on this site

Everything above runs inside this page. JSON to CSV needs no account, no upload, and no server round trip — close the tab and nothing is left behind.

JSON 轉 CSV能做什麼

把 JSON 物件陣列轉成 CSV,物件的鍵成為標題列,每個物件成為一列資料。它是「說 JSON 的系統」與「只認表格的試算表、財務工具與匯入程式」之間的橋樑。

什麼時候用得上

  • 把 API 匯出資料放進試算表,供分析或同事審閱。
  • 為只接受 CSV 上傳的系統準備 JSON 資料。
  • 把載荷整理成人看得懂的表格放進報告。

使用步驟

  1. 提供 JSON 物件陣列。
  2. 執行轉換。
  3. 檢視產生的表格。
  4. 下載 CSV 檔案。

精確度、限制與實務建議

  • 鍵不一致的物件會產生欄位聯集,缺少該欄位的紀錄在該格留空即可。
  • 巢狀物件沒有天然對應的欄位;請先攤平 JSON,讓每個巢狀值有自己的點路徑欄名。
  • 含逗號、引號或換行的值在輸出中會加引號,確保檔案到哪都解析得了。
  • 匯入任何地方前請先檢查欄位清單:只要有一筆紀錄多了一個欄位,就會悄悄多出一欄,而目的端未必預期得到。

常見問題

如果我的 JSON 是單一物件而不是陣列?

請把它包成陣列,或先用 JSON 路徑提取工具取出需要的陣列。

巢狀陣列怎麼處理?

它沒有表格上的對應。請先攤平文件,陣列元素會變成帶索引的欄位。

可以直接得到 Excel 檔嗎?

可以,JSON 轉 Excel 工具會寫出 XLSX 活頁簿,並可選擇攤平巢狀物件。

布林值與 null 會怎樣?

會變成對應的文字形式,因此接收系統必須自行解讀 true、false 與空字串。

本站相關工具

以上步驟全部在這個頁面內完成,JSON 轉 CSV 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。