use case

How to convert a JSON API response to a CSV spreadsheet

Export API data to a CSV file for analysis in Excel or Google Sheets.

REST APIs return data as JSON, but business users want spreadsheets. Converting an API response to CSV lets you open it in Excel, share it by email, or import it into a reporting tool — without writing a Python script or installing software. This guide shows how to convert any JSON array response to a CSV file you can open directly in a spreadsheet.

Step-by-step guide

  1. Copy the JSON array from the API response: Use your browser's DevTools Network tab, Postman, or curl to capture the API response. Copy the JSON array — it should look like [{...}, {...}]. If the array is nested inside a wrapper object, extract just the array.
  2. Paste and convert: Paste the JSON into the converter with mode set to 'json-to-csv'. The header row is generated from the keys of the first object. Enable 'flatten' if the response contains nested objects like address or metadata.
  3. Save as .csv and open in Excel: Copy the output, paste it into a text editor, and save with a .csv extension. Open in Excel or drag into Google Sheets. All column headers and values appear in the correct cells.

Frequently asked questions

Why does my data appear in one column in Excel?
Excel uses the system locale's list separator. In European locales, Excel expects semicolons instead of commas. Re-run the conversion with delimiter set to ';', or use Excel's Data → Text to Columns wizard to split the single column.
What if the JSON array has thousands of rows?
The REST API accepts up to 1 MB of input. For larger datasets, use Node.js: const rows = JSON.parse(fs.readFileSync('data.json')); const headers = Object.keys(rows[0]); const csv = [headers, ...rows.map(r => headers.map(h => r[h]))].map(r => r.join(',')).join('\n'); fs.writeFileSync('data.csv', csv);

Try it now

Use the JSON to CSV Converter to complete this task — free, no sign-up, runs in your browser.

Open JSON to CSV Converter

We use cookies to serve ads and measure traffic. Cookie policy · Privacy policy