CSV to JSON
POST
/v1/convert/csv-to-json
curl -X POST "https://convert.toolkitapi.io/v1/convert/csv-to-json" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"csv": "name,age\nAlice,30\nBob,25"}'
# See curl example
// See curl example
Response
200 OK
{
"json": [
{"name": "Alice", "age": "30"},
{"name": "Bob", "age": "25"}
],
"row_count": 2,
"column_count": 2
}
How to Use
1
Send a POST request to /v1/convert/csv-to-json with a csv string and optional delimiter.
About This Tool
Parse CSV text into a JSON array of objects. The first row is used as header keys, and each subsequent row becomes a JSON object.
Handles quoted fields, escaped delimiters, newlines within quotes, and multi-byte characters. Supports custom delimiters.
Why Use This Tool
- Spreadsheet Import — Import CSV exports from Excel or Google Sheets into your JSON-based application.
- Data Ingestion — Convert CSV data feeds into JSON for downstream processing in APIs and databases.
Frequently Asked Questions
How are data types handled?
All values are returned as strings. Use your application logic to parse numbers or dates.
What if the CSV has no header row?
The first row is always treated as the header. If your data has no header, prepend one before sending.
Start using CSV to JSON now
Get your free API key and make your first request in under a minute.