JSON to CSV Converter
This tool transforms arrays of JSON objects into CSV format. Great for exporting structured data to spreadsheets or flat files.
This tool transforms arrays of JSON objects into CSV format. Great for exporting structured data to spreadsheets or flat files.
This tool allows developers and data analysts to convert structured JSON into a clean, comma-separated values (CSV) format. Perfect for exporting data to Excel, Google Sheets, or CSV APIs.
Input JSON:
[
{ "name": "Alice", "age": 30 },
{ "name": "Bob", "age": 25 }
]
Output CSV:
name,age Alice,30 Bob,25
Turning JSON into CSV means flattening a tree into a grid. This tool expects an array of objects and reads the column names from the keys of the first object only. Each later object contributes one row, and its values are written in that same column order. Every cell is wrapped in double quotes, and any double quote inside a value is doubled, which is the escaping rule described in RFC 4180. That makes values containing commas or quotes safe for spreadsheets. Missing keys and null values become empty cells, and numbers are written as plain text inside the quotes.
The first-object rule has consequences worth remembering. If the second object has a key that the first lacks, that key is silently left out, so put the most complete record first or normalize the data beforehand. Nested values are not expanded: an inner object is written as the text [object Object], while an inner array is joined into one comma-separated string within a single quoted cell. Empty arrays and top-level objects that are not arrays are rejected with an error message. For deeply nested data, flatten it first by choosing the fields you need.
Yes, everything runs in your browser. No data is sent anywhere.
You must input an array of objects like: [{"key":"value"}, {"key":"value"}]
No, only flat key-value pairs. Nested objects won't convert correctly into CSV format.
Column headers come from the first object in the array only. Keys that appear in later objects but not in the first one are dropped, so reorder or normalize your data.
Yes, each data cell is placed in double quotes and any inner quote is doubled. Spreadsheet programs read these quotes as delimiters and remove them, so commas and quotes inside values are preserved.