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
Edge Cases For Flat Data Conversion
- Deeply nested objects stringify as [object Object]
- Arrays of arrays lose structure in flat rows
- Mixed types in a single array cause conversion errors
- Inconsistent keys across objects create empty cells
- Circular references crash the browser parser
Supported Data Structures
The tool processes standard arrays of objects where keys become headers and values populate rows. It handles primitive types like strings, numbers, and booleans directly. Complex nested structures require flattening first to avoid data loss or formatting errors in the final spreadsheet.
Real Conversion Example
- Input JSON array: [{"id": 101, "name": "Alice", "score": 95.5}, {"id": 102, "name": "Bob", "score": 88.2}]
- Flatten objects to rows with headers: id, name, score
- Generate CSV string: id,name,score\n101,Alice,95.5\n102,Bob,88.2
- Download file containing exactly two data rows and one header row
Key Features
Array Of Objects Input
Accepts JSON arrays where each object converts to a CSV row and first-object keys define headers.
Automatic Header Generation
Extracts object keys to create the first CSV row without manual configuration.
Flat Structure Output
Converts nested objects and arrays into string values for tabular compatibility.
Privacy & Security
Client-side processing via PapaParse. Files processed in browser.
Frequently Asked Questions
What JSON Format Does This Accept?
This tool requires a top-level array of objects where each object represents a single row. It processes standard structures like [{"name":"John","age":30}] directly into tabular data. Users must manually wrap single objects or flatten deeply nested arrays before uploading to ensure the parser recognizes the data correctly.
What Happens To Nested Objects?
Nested objects serialize into a single string value within one column instead of expanding into separate fields. For instance, a field like {"user":{"name":"John"}} appears as the literal string "[object Object]" in the output. You must flatten complex structures using external tools like jq or JavaScript prior to import to resolve this limitation.
How Are Arrays Inside Objects Handled?
Arrays contained within objects convert into comma-separated strings for the specific column. A field such as {"tags":["a","b"]} results in a cell containing the text "a,b". This method creates delimiter conflicts if the CSV separator matches the array join character, necessitating custom delimiter settings.
What If Objects Have Different Keys?
The CSV header row extracts keys exclusively from the first object in the provided array. Any subsequent objects containing extra keys lose those fields, while missing keys generate empty cells in the final file. Normalizing the data structure to ensure consistent keys across all items prevents this data loss during conversion.
Are Data Types Preserved?
CSV exports retain raw data types exactly as they appear in the source JSON file. Excel files often automatically reformat numeric values into specific date or number formats when the spreadsheet opens. Boolean values convert to text strings like 'true' or 'false', while null entries become empty cells in the final output.