A developer sends over an API response and a colleague who lives in spreadsheets cannot do anything with it. CSV bridges the gap: it opens directly in Excel or Google Sheets, with one record per row and one field per column.
JSON to CSV Converter FREE online toolRuns in your browser. No sign-up, nothing to install. Open the tool →What the conversion does
The tool reads a JSON array of objects and uses the keys as column headers. Each object becomes a row. Nested objects are not flattened: a field like address that holds an object will not become separate columns, so flatten such fields in the JSON before you convert.
The structure that converts cleanly is a flat array of similar objects. If your JSON is a single object, or wraps the array inside another key such as data or results, copy just the array before pasting.
Check the row count against the source before you hand it over. If the array had 250 objects, the sheet should show 250 rows below the header. A mismatch often means the JSON was truncated when you copied it, which is easy to miss in a long response.
Steps
If the response is paginated, remember that one page is only a slice of the data. Fetch each page, convert them separately and paste the rows into one sheet, keeping a single header row, or ask the API owner for a bulk export.
- Copy the JSON array from the API response, without any outer wrapper.
- Paste it into the JSON to CSV Converter and check the column headers.
- Copy the CSV and save it in a file with a .csv extension.
- Open it in Excel or import it into Google Sheets, choosing UTF-8 encoding if the option appears.
- Set column formats for dates and long numbers before sorting.
- Add filters to the header row and start analyzing.
Problems to expect in Excel
Excel is eager to reinterpret data. Long numeric IDs, such as 16-digit order numbers, can be shown in scientific notation and lose their trailing digits when saved. Leading zeros in codes or phone numbers disappear. Values like 1-2 or 3/4 may be turned into dates.
Importing through the data import dialog instead of double-clicking lets you mark such columns as text and keep them intact.
- Set ID, phone and ZIP columns to Text on import.
- Check that dates arrive in ISO format such as 2024-03-05 and convert them if needed.
- If accented or non-Latin characters look garbled, re-import with UTF-8 encoding.
- Check delimiters: some regional Excel settings expect semicolons instead of commas.
Nested and missing data
Arrays inside records, such as a list of tags or order items, do not map neatly to a single cell. They end up as plain text in a single cell, and lists of objects will not be readable there. Decide what you need: one row per order, or one row per order line. For the second you may need to restructure the JSON first.
If some objects lack a key, the cell for that row stays empty. That is normal, but the column headers come from the first object only, so a field that exists only in later records gets no column. Put a complete object first, or add the missing keys to it.
Sensitive data deserves thought. API responses can include emails, tokens and internal IDs, so remove fields you do not want to share before you send the spreadsheet along.
Commas, quotes and line breaks inside values are handled by wrapping the cell in double quotes, with inner quotes doubled. That is standard CSV behavior and Excel understands it, but if you edit the file by hand in a text editor, keep those quotes in place or the columns will shift.
Comments (0)
No comments yet. Be the first to share a thought.