CSV to JSON Converter
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.
Result
Press “Run” to see the result.
Send CSV text in the csv field or as a raw text/csv / text/plain body. By default the first row is used as header and each following row becomes an object (rows), with fields listing the column names. Set header=false to get arrays of values instead.
The delimiter (comma, semicolon, tab, pipe...) is detected automatically, or forced with delimiter. Numbers and booleans are converted to JSON types (dynamic_typing, on by default); set dynamic_typing=false to keep every value as a string. Quoted fields with commas and line breaks are handled, and empty lines are skipped.
The response also includes row_count, the delimiter used and up to 50 parse errors (row, message, code), such as rows with too few fields. The request body is limited to 5 MB.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/csv-to-json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"csv":"name,age,city\nAlice,30,Hanoi\nBob,25,\"Ho Chi Minh City\""}'const res = await fetch('https://apibox.io.vn/v1/csv-to-json', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"csv": "name,age,city\nAlice,30,Hanoi\nBob,25,\"Ho Chi Minh City\""
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/csv-to-json",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"csv": "name,age,city\nAlice,30,Hanoi\nBob,25,\"Ho Chi Minh City\""},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/csv-to-json');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"csv":"name,age,city\\nAlice,30,Hanoi\\nBob,25,\\"Ho Chi Minh City\\""}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Is the delimiter detected automatically?
Yes. Comma, semicolon, tab and other common delimiters are detected; use delimiter to force one.
Are numbers converted or kept as strings?
Numbers and booleans are converted by default. Send dynamic_typing=false to keep all values as strings (useful for zip codes or IDs with leading zeros).
What if my CSV has no header row?
Set header=false; each row is then returned as an array and fields is null.