JSON to CSV Converter API
Convert a JSON array of objects to CSV.
POST /api/v1/tools/json-to-csvMCP json_to_csvData & ConversionConvert a JSON array of objects to CSV for Excel or Google Sheets. Flattens nested objects into dotted columns and quotes values correctly. Runs in your browser.
Input
Send these as a JSON object. Unknown fields are rejected.
- input
- A JSON array of objects. (string, required)
curl https://pithlab.com/api/v1/tools/json-to-csv \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"input":"[{\"name\":\"Ada\",\"age\":36},{\"name\":\"Alan\",\"age\":41}]"}'Example response
{
"ok": true,
"result": {
"output": "name,age\nAda,36\nAlan,41",
"rows": 2,
"columns": [
"name",
"age"
]
}
}