JSON 轉 CSV 工具

JSON to CSV Converter

關於此工具
About This Tool

此工具可將 JSON 格式的資料轉換為 CSV 格式,特別適合處理包含多筆資料的 JSON 檔案。

This tool converts JSON format data to CSV format, particularly suitable for processing JSON files containing multiple records.

轉換過程說明:

Conversion process:

  • CSV 的欄位名稱會根據 JSON 資料中第一筆資料的欄位自動產生
  • JSON 物件的鍵值(key)會被當作識別欄位(可自訂欄位名稱)
  • 所有資料會依照第一筆資料的欄位順序排列
  • 如果欄位值是陣列,會自動轉換為以分號分隔的字串
  • CSV field names are generated from the fields of the first record in JSON data
  • JSON object keys are used as identifier fields (customizable field name)
  • All data is arranged according to the field order of the first record
  • Array values are automatically converted to semicolon-separated strings
預設為「id」,可自行更改為其他名稱(如:編號、代碼等)
Default is "id", can be changed to other names (e.g., number, code, etc.)
請上傳要轉換的 JSON 檔案
Please upload the JSON file to convert
請貼上要轉換的 JSON 文字
Please paste the JSON text to convert
JSON 格式範例
JSON Format Example
{
    "A001": {
        "name": "項目一",
        "value": "100",
        "tags": ["tag1", "tag2", "tag3"],
        "category": ["分類1", "分類2"]
    },
    "A002": {
        "name": "項目二",
        "value": "200",
        "tags": ["tagA"],
        "category": ["分類3"]
    }
}

將轉換為:

Will be converted to:

id,name,value,tags,category
A001,項目一,100,"tag1;tag2;tag3","分類1;分類2"
A002,項目二,200,tagA,分類3