Skip to main content

Json To 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 Input

CSV Output

Share this tool
Developer Tools

About the 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.

How to use it

  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.

Formula & methodology

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

Common use cases

  • 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

Frequently asked questions

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.

Related tools

All Tools →

Embed this tool on your site

Free for personal and commercial use. Just copy the snippet below.