Skip to content
POST AI agent ready /v1/csv/to-csv

JSON to CSV API - Free Converter

Takes a JSON string containing an array of objects and converts it to CSV format. Column headers are generated from the object keys. Nested objects are flattened using dot notation.

Parameters

arrayrequired

An array of objects to convert to CSV.

Code examples

curl -X POST https://api.botoi.com/v1/csv/to-csv \
  -H "Content-Type: application/json" \
  -d '{"data":[{"name":"Alice","email":"alice@example.com","plan":"pro"},{"name":"Bob","email":"bob@example.com","plan":"free"}]}'

When to use this API

Export database query results as CSV downloads

Convert API query results to CSV format for users who need to import data into Excel, Google Sheets, or other spreadsheet tools.

Generate CSV reports from JSON analytics data

Transform JSON analytics or billing data into CSV for finance teams who work in spreadsheet-based workflows.

Frequently asked questions

How are nested objects handled?
Nested objects are flattened using dot notation. For example, {"address": {"city": "NYC"}} becomes a column named "address.city".
What if objects have different keys?
The API collects all unique keys across all objects for the header row. Missing values are left as empty fields in the CSV.
Are values with commas properly escaped?
Yes. Values containing commas, double quotes, or newlines are wrapped in double quotes per the CSV specification.
Can I specify which columns to include?
The API exports all keys. To limit columns, filter the JSON array to include only the desired keys before sending.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.