Passer au contenu principal

Convertisseur JSON en 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.

Entrée JSON

Sortie CSV

Partager cet outil
Developer Tools

À propos de 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.

Comment l'utiliser

  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.

Formule et méthodologie

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).

Cas d'usage courants

  • 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

Questions fréquentes

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.

Outils connexes

Tous les outils →

Intégrer cet outil sur votre site

Gratuit pour usage personnel et commercial. Copiez simplement le code ci-dessous.