JSON to CSV

100% Private Report Issue

Select Files

or drag and drop files here

Upload a JSON file

Convert JSON arrays to CSV format. Flattens object arrays into tabular structure. Object keys become CSV headers, values populate rows.

How to Convert JSON to CSV

01

Upload JSON file (array of objects)

02

Objects flatten to CSV rows

03

Download .csv file

04

Open in Excel, import to databases, or use in spreadsheets

JSON structures that don't convert well

  • Deeply nested objects—CSV is flat, nesting becomes [object Object]
  • Arrays of arrays—no header structure to map
  • Single object (not array)—produces one-row CSV
  • Mixed types in array—[{...}, "string", 123] causes errors
  • Objects with inconsistent keys—missing fields create gaps
  • Circular references—JSON.stringify fails
  • Very large arrays (1M+ objects)—browser memory limits

Flatten nested JSON before conversion

  1. Using jq command: jq -r '.[] | [.user.name, .user.email] | @csv' input.json > output.csv
  2. Using JavaScript: data.map(obj => ({name: obj.user.name, email: obj.user.email}))
  3. Using Python pandas: pd.json_normalize(data).to_csv('output.csv')
  4. Manual flattening: Write script to extract nested values to top level
  5. Online tools: Use JSONPath or jq playground to transform structure first

API response conversion workflow

Common pattern: fetch API data → save JSON response → convert to CSV → analyze in Excel. Works for paginated APIs: fetch all pages into single JSON array, then convert. For large datasets: stream JSON, convert in chunks. Many APIs return nested responses—extract data array first. Example: {"status":"ok","data":[{...}]} → extract data array → convert that array to CSV.

Common JSON to CSV use cases

  • Export API responses to spreadsheets for non-technical analysis
  • Convert NoSQL database dumps (MongoDB, Firebase) to CSV for reporting
  • Transform web scraping results to tabular format
  • Prepare JSON data for SQL database import
  • Convert application logs to CSV for analysis tools
  • Export form submissions from JSON storage to Excel
  • Migrate data from JSON-based CMS to CSV-based systems
  • Generate reports from JSON analytics data

JSON vs CSV for data storage

CSV: Smaller file size—no key repetition per row
JSON: Keys repeated in every object—verbose
CSV: Excel/database native format
JSON: Requires parsing/conversion for spreadsheets
CSV: Flat structure only—can't represent hierarchy
JSON: Nested objects and arrays supported
CSV: All values become text in many systems
JSON: Data types explicit (number, boolean, null)

Handling inconsistent JSON structures

Real-world JSON often has inconsistent keys across objects. Solution: collect all unique keys from entire array, use as CSV headers, fill missing values with empty cells. JavaScript: allKeys = [...new Set(data.flatMap(Object.keys))]. Or normalize with schema library before converting. For optional fields, decide if empty cell or default value (0, 'N/A') is better. Document assumptions for data consumers.

Key Features

Array of Objects Input

Expects [{...},{...}] format. Each object becomes CSV row. Keys from first object become headers.

Automatic Header Generation

Object keys export as first CSV row. Consistent across all objects.

Flat Structure Output

Nested objects/arrays flatten to strings. Complex structures need preprocessing.

Privacy & Security

Client-side processing via PapaParse. Files processed in browser.

Frequently Asked Questions

What JSON format does this accept?

Array of objects: [{"name":"John","age":30},{"name":"Jane","age":25}]. Single objects or nested arrays won't convert correctly—wrap in array first.

What happens to nested objects?

They stringify: {"user":{"name":"John"}} becomes user column with value "[object Object]". Flatten JSON first using jq or JavaScript before converting.

How are arrays inside objects handled?

Arrays convert to comma-separated strings: {"tags":["a","b"]} becomes tags column with "a,b". May conflict with CSV delimiter.

What if objects have different keys?

CSV uses keys from first object. Later objects with extra keys lose those fields. Objects missing keys get empty cells. Normalize structure first.

Are data types preserved?

Yes in CSV values, but Excel may reformat: numbers stay numbers, booleans become true/false text, null becomes empty cell.