convert csv to json and back, auto-detect delimiter
curl -sX POST 'https://api.whittly.dev/v1/csv/to-json' \
-H 'Authorization: Bearer $WHITTLY_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"input":"name,age\nalice,30\nbob,25","delimiter":",","headers":true}'
const res = await fetch('https://api.whittly.dev/v1/csv/to-json', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ input: "name,age\nalice,30\nbob,25", delimiter: ",", headers: true }),
});
const data = await res.json();
const { data } = await axios.post(
'https://api.whittly.dev/v1/csv/to-json',
{ input: "name,age\nalice,30\nbob,25", delimiter: ",", headers: true },
{ headers: { Authorization: 'Bearer ' + apiKey } }
);
CSV (Comma-Separated Values) is a universal tabular data format supported by every spreadsheet application and database. JSON is the standard format for APIs and JavaScript applications. This tool converts between them, handling quoted fields, escaped characters, and multiple delimiter types.