CSV to JSON API
Convert CSV data or a remote CSV file URL to a structured JSON array — with a single POST request.
Get your API token
Create an account and subscribe ($9/month) to start using the API.
Endpoint
POST https://abesttools.com/api/csv-to-json
Authentication
Pass your API token in one of two ways:
- POST body field:
token=YOUR_TOKEN - Header:
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
csv |
string | Yes* | — | Raw CSV text (* or provide url) |
url |
string | Yes* | — | URL of a remote CSV file to fetch (* or provide csv) |
token |
string | Yes* | — | Your API token (* or use Authorization header) |
delimiter |
string | No | , |
Single character field delimiter (e.g. ; \t |) |
has_header |
string | No | 1 |
Whether the first row is a header (1 = yes, 0 = no). When yes, returns array of objects; when no, returns array of arrays. |
Example — raw CSV (with header)
curl -X POST "https://abesttools.com/api/csv-to-json" \
-H "Authorization: Bearer YOUR_TOKEN" \
--data-urlencode "csv=name,age,city
Alice,30,London
Bob,25,Paris"
-H "Authorization: Bearer YOUR_TOKEN" \
--data-urlencode "csv=name,age,city
Alice,30,London
Bob,25,Paris"
Example — remote CSV file
curl -X POST "https://abesttools.com/api/csv-to-json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d "url=https://example.com/data.csv"
-H "Authorization: Bearer YOUR_TOKEN" \
-d "url=https://example.com/data.csv"
Response — with header row (has_header=1)
[
{ "name": "Alice", "age": "30", "city": "London" },
{ "name": "Bob", "age": "25", "city": "Paris" }
]
Response — no header row (has_header=0)
[ ["Alice", "30", "London"], ["Bob", "25", "Paris"] ]
Error responses
| Status | Meaning |
|---|---|
401 | Invalid or missing API token |
403 | Active subscription required |
422 | Missing or invalid csv/url parameter, or CSV parse error |
502 | Could not fetch the remote CSV file |