# CSV to JSON

> Convert CSV to a JSON array online. Detects the delimiter, reads quoted cells, uses the first row as keys and turns numbers into numbers.

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

Paste a spreadsheet export and get JSON you can feed to an API, a script or a seed file. Quoted cells, commas inside quotes and line breaks inside cells are read correctly.

1. Paste the CSV, header row first.
2. Leave the delimiter on Auto, or pick one.
3. Press Convert and copy or download the JSON.

## Input

| Field | Type | Required | What it is |
| --- | --- | --- | --- |
| `csv` | text | yes | CSV. |
| `delimiter` | "auto" \| "comma" \| "semicolon" \| "tab" | no | Delimiter. Default: "auto". |
| `header` | true \| false | no | First row is the header. Default: true. |
| `detect_types` | true \| false | no | Detect numbers and booleans. Default: true. |

## Example

Input:

```json
{
  "csv": "name,plan,seats,active\nAna,pro,5,true\n\"Ben, Jr.\",starter,1,false"
}
```

Result:

```json
{
  "json": "[\n  {\n    \"name\": \"Ana\",\n    \"plan\": \"pro\",\n    \"seats\": 5,\n    \"active\": true\n  },\n  {\n    \"name\": \"Ben, Jr.\",\n    \"plan\": \"starter\",\n    \"seats\": 1,\n    \"active\": false\n  }\n]",
  "rows": 2,
  "columns": 4
}
```

## 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": "csv-to-json", "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/csv-to-json/run \
  -H "Authorization: Bearer $ORKOSI_API_KEY" -H "Content-Type: application/json" \
  -d '{"input":{"csv":"name,plan,seats,active\nAna,pro,5,true\n\"Ben, Jr.\",starter,1,false"}}'
```

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

## Questions

**How is the delimiter detected?**

The first line is checked for commas, semicolons and tabs; the one that appears most is used. You can also set it yourself.

**Are numbers kept as text?**

With Detect types on, whole and decimal numbers become JSON numbers, true and false become booleans and empty cells become null. Long digit strings such as IDs stay text.

**What if there is no header row?**

Turn off First row is the header and each row becomes an array of values instead of an object.

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