Convert CSV (with a header row) to JSON rows

Converts CSV text to a JSON array of objects, using the first row as keys. Detects the delimiter and converts numbers/booleans automatically.

Request

POSThttps://data-tools.p.apihiver.com/v1/csv-to-json

JSON object. Required: csv.

Request Body

Edit the values below to test different scenarios.

Parameters and body structure are inherited from this endpoint's definition. Changes here only apply to this test run.

Language
Client
1curl --request POST \
2  --url https://data-tools.p.apihiver.com/v1/csv-to-json \
3  --header 'Accept: application/json' \
4  --header 'Content-Type: application/json' \
5  --header 'X-API-Key: YOUR_API_KEY' \
6  --data '{
7  "csv": "name,age\nAsha,30\nRavi,25"
8}'

Convert CSV (with a header row) to JSON rows: Data Tools API reference

Converts CSV text to a JSON array of objects, using the first row as keys. Detects the delimiter and converts numbers/booleans automatically. This endpoint is part of the Data Tools API: Convert CSV ⇄ JSON, generate realistic fake test data (including Indian names and addresses), and create UUIDs in bulk.

Example response (200, application/json)

Success.

1{
2  "rows": [
3    {
4      "age": 30,
5      "name": "Asha"
6    },
7    {
8      "age": 25,
9      "name": "Ravi"
10    }
11  ],
12  "columns": [
13    "name",
14    "age"
15  ],
16  "delimiter": ",",
17  "row_count": 2
18}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "csv: Field required"
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.