تخطى إلى المحتوى الرئيسي

محول JSON إلى CSV

Converting JSON to CSV flattens structured data into a tabular format suitable for spreadsheets, database imports, and reporting tools. The challenge is handling nested objects and arrays — our converter offers multiple strategies: dot-notation flattening, JSON-encode nested values, or skip nested fields.

إدخال JSON

مخرجات CSV

شارك هذه الأداة
Developer Tools

حول JSON to CSV Converter

Converting JSON to CSV flattens structured data into a tabular format suitable for spreadsheets, database imports, and reporting tools. The challenge is handling nested objects and arrays — our converter offers multiple strategies: dot-notation flattening, JSON-encode nested values, or skip nested fields.

كيفية الاستخدام

  1. Paste a JSON array of objects (each object becomes a CSV row).
  2. Configure: delimiter, quoting style, include header row.
  3. For nested objects: choose flatten (address.city → address_city) or JSON-encode.
  4. Download as .csv or copy to clipboard.

الصيغة والمنهجية

Each JSON object → one CSV row. Object keys → column headers (from first object, or union of all objects). Flatten nested: {"address": {"city": "NYC"}} → address_city,NYC. Null → empty cell. Arrays in values → JSON-encoded string in cell. Boolean → "true"/"false". Number → numeric string (no quotes).

حالات الاستخدام الشائعة

  • Exporting API data to Excel for business stakeholder reports
  • Database imports: most SQL tools accept CSV for BULK INSERT
  • Google Sheets: paste CSV to instantly create a formatted spreadsheet
  • Analytics: exporting JSON API responses to CSV for data analysis
  • Audit logs: flattening structured JSON logs into tabular format

الأسئلة الشائعة

Our converter unions all keys across all objects to form the header row, then fills missing values with empty strings. This produces a valid CSV where sparse objects have empty cells for keys they don't have. Alternatively, you can use the first-object-only mode, which only includes keys from the first object and ignores extra keys in subsequent objects.
Three options: (1) JSON-encode the array as a string in the CSV cell — simple but the cell contains JSON; (2) flatten numbered indices (tags[0], tags[1]); (3) skip array fields entirely. Choice depends on downstream use. For spreadsheets, JSON-encoding is often most readable. For SQL imports, skipping or separate tables is cleaner.

أدوات ذات صلة

كل الأدوات →

دمج هذه الأداة في موقعك

مجاني للاستخدام الشخصي والتجاري. فقط انسخ الكود أدناه.