JSON to CSV
Turn a JSON array of objects into CSV. Nested objects become dotted column names.
Input
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
| Name | Type | Required | What 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"
]
}Related tools
- CSV to JSONTurn CSV rows into a JSON array of objects, detecting numbers, booleans and blanks.
csv-to-json - JSON flattenFlatten nested JSON into one level of dotted keys such as "user.address.city".
json-flatten - .env to JSONParse a .env file into a JSON object, handling quotes, comments and "export" prefixes.
env-to-json - CSV profilerSummarise each CSV column: type, blanks, distinct values, min, max, mean and top values.
csv-profile - CSV sort, filter and dedupeSort CSV by a column, keep rows containing some text, pick columns and remove duplicate rows.
csv-sort-filter-dedupe - CSV to Markdown tableTurn CSV into a Markdown table ready to paste into a README, issue or chat.
csv-to-markdown-table