JSON to CSV Converter — Export JSON Arrays to Spreadsheet-Ready CSV
Convert JSON arrays to CSV format for use in spreadsheets and databases. Handles nested objects, custom delimiters, and automatic column detection.
JSON is great for APIs and code, but when your non-technical colleague asks for "a spreadsheet" with the data, they mean CSV or Excel — not a blob of curly braces. Converting JSON back to a flat table format is the daily reality for developers who bridge the gap between APIs and business users. The CalcHub JSON to CSV Converter flattens JSON arrays into clean CSV that opens directly in Excel, Google Sheets, or any data tool.
How It Works
The converter expects a JSON array of objects where each object represents one row:
Input JSON:[
{"product": "Widget A", "price": 9.99, "stock": 150},
{"product": "Widget B", "price": 14.99, "stock": 82},
{"product": "Widget C", "price": 4.99, "stock": 340}
]
Output CSV:
product,price,stock
Widget A,9.99,150
Widget B,14.99,82
Widget C,4.99,340
How to Use It
- Open CalcHub and go to JSON to CSV Converter.
- Paste your JSON array.
- Configure:
- Copy or download the .csv file.
Handling Nested Objects
Nested JSON doesn't map directly to flat CSV. The converter handles it with dot-notation flattening:
JSON:{"name": "Alice", "address": {"city": "London", "zip": "EC1A"}}
Flattened CSV:
name,address.city,address.zip
Alice,London,EC1A
Column Order
JSON objects don't have a guaranteed key order. The converter extracts all unique keys from the first object (or all objects if keys vary) and uses that as the column order. You can reorder columns before downloading.
Tips
- Inconsistent keys: If some objects have fields that others don't, missing values become empty cells. The column headers still reflect all possible fields across all objects.
- Large arrays: For JSON files over a few MB, using the file upload option is faster than pasting.
- Numbers and booleans: JSON numbers and booleans are output unquoted in CSV; they'll be correctly interpreted as numbers in Excel.
What if my JSON has arrays within objects?
Arrays within objects are the trickiest case. Options are: join array elements with a separator ("a|b|c"), expand each array element to its own column (tag_1, tag_2, tag_3), or output the raw JSON string for that field. The converter lets you choose per-field behavior.
Can I convert a JSON object (not an array) to CSV?
A single JSON object (not wrapped in an array) can be converted to a two-column CSV: one column for keys and one for values. This is useful for config objects or summary data.
Will special characters break the CSV?
Fields containing commas, quotes, or newlines are automatically wrapped in double quotes and internal quotes are escaped as "" — following RFC 4180 standard. This ensures the output opens correctly in any compliant CSV reader.
Related tools: CSV to JSON Converter · JSON Formatter · Sort Lines Tool