OnlyFormat

JSON to CSV Converter

Convert JSON arrays to CSV format instantly. Paste text or upload a .json file.

No data sent to server
JSON Input
CSV Output

Related Tools

What is JSON to CSV?

JSON dominates web APIs; CSV dominates spreadsheets and BI tools. Converting JSON → CSV bridges that gap, letting you take API responses, MongoDB exports, or log data and analyze them in Excel, Google Sheets, Tableau, or import into databases.

Common scenarios: API response analysis (paste API output into Excel for deeper analysis), NoSQL → SQL migration (MongoDB JSON → PostgreSQL via CSV import), data deliverables for non-technical stakeholders, backup/audit logs for spreadsheet review.

Conversion example

# JSON input
[
  { "name": "Alice", "age": 30, "city": "Seoul" },
  { "name": "Bob",   "age": 25, "city": "Tokyo" }
]

# CSV output
name,age,city
Alice,30,Seoul
Bob,25,Tokyo

Handling complex structures

  • Different keys per object: tool collects all unique keys as headers; missing values are empty
  • Nested objects: serialized as JSON strings inside cells (preserves data, but ugly in spreadsheet view)
  • Arrays inside objects: same — serialized as JSON strings
  • Nested array of objects: not flattened — keep at top level for clean CSV
  • Boolean/null values: true/false kept as text; null becomes empty string
  • Special characters in values: commas/quotes/newlines properly escaped per RFC 4180

For deeply nested JSON

If your JSON has many nested levels (3+ deep), CSV is the wrong format — flat tables can't represent hierarchies cleanly. Options:

  • Pre-flatten with jq: jq '[.users[] | {name, email, status}]' input.json
  • Pre-flatten with Python: pandas' json_normalize() handles nesting elegantly
  • Use Parquet or Arrow instead: better for hierarchical analytics data
  • Stay in JSON: use jq for filtering instead of converting

How to Use

  1. Paste a JSON array of objects, or upload a .json file.
  2. Click Convert.
  3. Review the CSV — open in Excel/Sheets to verify columns and rows.
  4. Copy or download as .csv.

Privacy: All conversion runs in your browser. No upload.

FAQ

How are nested objects handled?

Serialized as JSON strings in cells (e.g., "address":{"city":"Seoul"} becomes a single cell with that JSON inside). Preserves data but isn't spreadsheet-friendly. Pre-flatten with jq for cleaner output.

What if objects have different keys?

All unique keys across all objects are collected as headers. Missing values are empty. This is correct behavior for sparse data.

My CSV opens with weird characters in Excel — fix?

Excel auto-detects encoding poorly. Save the file as .csv, then in Excel: Data → From Text/CSV → choose UTF-8 encoding. Or download with BOM (most tools include this option).

Can I convert a single JSON object (not an array)?

Single objects produce a 2-column CSV (key, value). Wrap in [...] first if you want a single-row table format.

How big can the JSON be?

Up to ~50 MB processes smoothly in browser. For larger data, use jq CLI: jq -r '...' | csvkit pipe.

⚠️ Reference Only

Output is generated based on your input and is provided for reference. Results may vary depending on your specific use case, edge cases, or environment-specific behavior. We do not guarantee accuracy of conversions, validations, or computed values.

Always verify critical outputs against official documentation or production environments. We are not responsible for any decisions or losses based on these tool results.