CSV to JSON
csv-to-json · version 1.0.0 · CSV & tables · free, no key needed
Convert a complete CSV document into an array of string-valued objects.
Use when you need to: csv to json · convert csv to json · parse csv rows.
Decide before calling
Read the versioned contract and the supported scope below. Reuse csv-to-json@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use csv-to-json@1.0.0 for csv to json. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- csv to json
- convert csv to json
- parse csv rows
Not supported
- infer types
- stream rows
- read files
- fetch urls
- json to csv
Behavior
- The first CSV record supplies object property names.
- Duplicate and empty header names are rejected.
- Every cell remains a string; numbers, booleans, nulls, and dates are not inferred.
- The whole CSV document is processed in one request and row order is retained.
Input
csv(string, required): max length 256000
Output
- array of object: max items 5000
Limits
- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
- max output bytes: 1048576
Example
Request input:
{
"csv": "name,city\nAda,London\n"
}
Response:
{
"result": [
{
"name": "Ada",
"city": "London"
}
]
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-to-json",
"version": "1.0.0",
"input": {
"csv": "name,city\nAda,London\n"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-to-json/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"name,city\nAda,London\n"}'
The machine-readable contract is at /v1/tools/csv-to-json/versions/1.0.0.
CLI
node cli.mjs run csv-to-json 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- CSV to markdown table: Render ASCII CSV with CRLF records as Markdown; rejects LF-only records and non-ASCII text.
- CSV dialect parse: Parse CSV with an explicit dialect into string rows, keeping leading zeros and embedded breaks.
- CSV filter compare: Filter ASCII CSV rows by string/decimal comparison; requires CRLF records, rejects LF-only and non-ASCII input.
- CSV transpose: Transpose a CSV matrix including the header row, then re-validate headers.
- CSV add row number: Prepend a 1-based row_number column of canonical integer strings.
- CSV anti join: Keep left CSV rows whose exact key tuples do not appear in the right document.