CSV to JSON Converter API
Convert CSV (comma, semicolon, tab or pipe separated) to JSON.
POST /api/v1/tools/csv-to-jsonMCP csv_to_jsonData & ConversionConvert CSV to JSON in your browser. Handles quoted fields, embedded commas and line breaks, detects comma, semicolon or tab delimiters, and can infer number types.
Input
Send these as a JSON object. Unknown fields are rejected.
- input
- The CSV text. (string, required)
- header
- Use the first row as keys. (boolean, default true)
- inferTypes
- Turn numbers and true/false into JSON numbers and booleans. (boolean, default false)
curl https://pithlab.com/api/v1/tools/csv-to-json \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"input":"name,age\nAda,36\nAlan,41","inferTypes":true}'Example response
{
"ok": true,
"result": {
"data": [
[
"name",
"age"
],
[
"Ada",
36
],
[
"Alan",
41
]
],
"rows": 3,
"delimiter": ",",
"warnings": []
}
}