JSON to CSV

Turn a JSON array of objects into CSV. Nested objects become dotted column names.

Input

A JSON array of objects (or one object).
Column separator for the output.

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/json-to-csv \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"[{\"name\":\"Sam\",\"address\":{\"city\":\"Oslo\"}},{\"name\":\"Alex\"}]"}}'
import json, urllib.request

body = {'input': {'text': '[{"name":"Sam","address":{"city":"Oslo"}},{"name":"Alex"}]'}}
request = urllib.request.Request("https://setget.net/v1/tools/json-to-csv", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/json-to-csv", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"text":"[{\"name\":\"Sam\",\"address\":{\"city\":\"Oslo\"}},{\"name\":\"Alex\"}]"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "json-to-csv",
  "input": {
    "text": "[{\"name\":\"Sam\",\"address\":{\"city\":\"Oslo\"}},{\"name\":\"Alex\"}]"
  }
}
{
  "input": {
    "text": "[{\"name\":\"Sam\",\"address\":{\"city\":\"Oslo\"}},{\"name\":\"Alex\"}]"
  }
}

Endpoint: POST /v1/tools/json-to-csv. Over MCP: run_tool with slug: "json-to-csv". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
text string yes A JSON array of objects (or one object).
delimiter string no Column separator for the output. One of: comma, tab, semicolon, pipe. Default: "comma".

Example

Input
{
  "text": "[{\"name\":\"Sam\",\"address\":{\"city\":\"Oslo\"}},{\"name\":\"Alex\"}]"
}
Result
{
  "text": "name,address.city\nSam,Oslo\nAlex,\n",
  "rows": 2,
  "columns": [
    "name",
    "address.city"
  ]
}