Select Files
or drag and drop files here
Upload a JSON file
How to Convert JSON to CSV
Upload JSON file (array of objects)
Objects flatten to CSV rows
Download .csv file
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
- Using jq command: jq -r '.[] | [.user.name, .user.email] | @csv' input.json > output.csv
- Using JavaScript: data.map(obj => ({name: obj.user.name, email: obj.user.email}))
- Using Python pandas: pd.json_normalize(data).to_csv('output.csv')
- Manual flattening: Write script to extract nested values to top level
- 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
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.