# JSON to CSV

> Convert a JSON array of objects to CSV for Excel or Google Sheets. Nested objects become dotted columns. Comma, semicolon or tab. Free.

Free tool by Orkosi. Page: https://orkosi.com/tools/json-to-csv

Take the JSON an API gave you and open it as a spreadsheet. Every object becomes a row, every key a column, and nested objects are flattened into columns such as address.city.

1. Paste a JSON array of objects.
2. Choose the delimiter your spreadsheet expects.
3. Press Convert and download the CSV.

## Input

| Field | Type | Required | What it is |
| --- | --- | --- | --- |
| `json` | text | yes | JSON. |
| `delimiter` | "comma" \| "semicolon" \| "tab" | no | Delimiter. Default: "comma". |

## Example

Input:

```json
{
  "json": "[{\"name\":\"Ana\",\"plan\":\"pro\",\"address\":{\"city\":\"Lisbon\"}},{\"name\":\"Ben\",\"plan\":\"starter\",\"address\":{\"city\":\"Leeds\"}}]"
}
```

Result:

```json
{
  "csv": "name,plan,address.city\nAna,pro,Lisbon\nBen,starter,Leeds",
  "rows": 2,
  "columns": 3
}
```

## Run it

It needs a free Orkosi account, nothing else. No credits are used.

- **A person**: open the page, enter an e-mail once, use the tool.
- **Claude or ChatGPT**: add the Orkosi connector `https://orkosi.com/api/v1/public/mcp` and sign in, or create the free account on the sign-in page. Then call `orkosi_run_free_tool` with `{ "tool": "json-to-csv", "input": { … } }`.
- **Any agent or program that can make an HTTP request**:

  1. Once, create the account: `POST https://orkosi.com/api/v1/public/signup` with `{ "name": "…", "email": "…", "terms_accepted": true }` and no key. Ask the person for the e-mail and their agreement to the terms first. The answer carries `data.api_key`, shown once.
  2. Run the tool:

```bash
curl -X POST https://orkosi.com/api/v1/public/tools/json-to-csv/run \
  -H "Authorization: Bearer $ORKOSI_API_KEY" -H "Content-Type: application/json" \
  -d '{"input":{"json":"[{\"name\":\"Ana\",\"plan\":\"pro\",\"address\":{\"city\":\"Lisbon\"}},{\"name\":\"Ben\",\"plan\":\"starter\",\"address\":{\"city\":\"Leeds\"}}]"}}'
```

The answer is `{ "data": { "tool": "…", "result": { … } } }`. A call without a key is answered 401 with the signup steps as data.

## Questions

**What happens to nested objects?**

One level of nesting becomes dotted columns (address.city). Deeper objects and arrays are written into the cell as JSON.

**Which delimiter should I use?**

Comma for most tools. Excel in many European locales expects a semicolon; choose Tab to paste straight into a sheet.

**What if the objects have different keys?**

The CSV has one column for every key found in any row; a row that lacks a key gets an empty cell.

All free tools: https://orkosi.com/tools.md
