This converts a JSON array of objects into CSV, using the keys from the first object as column headers. It's the reverse of the CSV to JSON converter, useful when you have structured JSON from an API or export that needs to land in a spreadsheet instead.
How to use it
- Paste a JSON array of objects in.
- Click convert.
- Review the CSV output, with headers from the first object's keys.
- Check that every row's values line up under the right headers.
- Copy the CSV and save it, or paste it into a spreadsheet.
When it helps
- Exporting a JSON API response into CSV for review in a spreadsheet.
- Preparing data from a JSON system for a tool that only accepts CSV.
- Sharing structured data with a colleague in a format they can open directly.
- Reviewing a JSON dataset's structure in a more familiar table layout.
- Converting sample JSON data into CSV for spreadsheet based reporting.
Good to know
- Make sure every object has the same set of keys, since the header row only comes from the first object.
- Watch for values that already contain commas. This tool wraps values in quotes to handle that safely.
- Flatten deeply nested objects before converting, since CSV doesn't represent nesting naturally.
- Open the resulting CSV in a spreadsheet right after converting to confirm the columns and rows line up before using it further.
- If you plan to reopen the CSV in a specific program, like Excel, save it with a .csv extension so the program recognizes and opens it correctly by default.
Nested data
Flat tables can't hold nested objects directly. Decide how nested fields should appear, for example as separate columns with dotted names, before you convert large data sets.
Questions
What happens if my objects have different keys?
The header row comes only from the first object's keys, so extra or missing keys in later objects may not line up. It's best to normalize the structure first.
Can this handle nested objects as values?
Flat, simple values work well. A nested object or array as a value gets converted to its JSON string form rather than expanded into separate columns.
Does it need a top level array specifically?
Yes, a single object or a deeply nested structure would need reshaping into an array of flat objects first.
How are commas inside a value handled?
Each value gets wrapped in quotes, the standard CSV convention for safely including a comma or other special character inside one field.
Can I convert a single object instead of an array?
This expects an array of objects specifically. Wrap a single object in square brackets to convert it into a one row CSV.
Does this handle boolean true or false values properly?
Yes, they convert to the text 'true' or 'false' in the resulting CSV, the same as any other value type.