📤

JSON to CSV

POST /v1/convert/json-to-csv
curl -X POST "https://convert.toolkitapi.io/v1/convert/json-to-csv" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"json": [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]}'
# See curl example
// See curl example
Response 200 OK
{
  "csv": "name,age\nAlice,30\nBob,25",
  "row_count": 2,
  "column_count": 2
}

How to Use

1

Send a POST request to /v1/convert/json-to-csv with a JSON body containing a json array of objects.

2

The response includes the CSV as a string along with row and column counts.

About This Tool

Convert a JSON array of objects to CSV format. The first object's keys become the CSV header row, and each subsequent object becomes a data row.

Handles nested values by serialising them as JSON strings in the cell. Supports custom delimiters (comma, tab, semicolon, pipe).

Why Use This Tool

Frequently Asked Questions

How are nested objects handled?
Nested objects and arrays are serialised as JSON strings within the CSV cell. Use the flatten endpoint first if you want flat columns.
Can I change the delimiter?
Yes — pass a 'delimiter' parameter with ',', '\t', ';', or '|'.

Start using JSON to CSV now

Get your free API key and make your first request in under a minute.