Docs
JSON to CSV Converter
Flatten a JSON array into CSV rows.
Docs
Flatten a JSON array into CSV rows.
Converts a JSON array of objects into CSV. Nested objects are serialized to JSON strings.
POST /api/v1/tools/convert
Convert text between CSV, JSON, XML, YAML, and SQL by pivoting through JSON when no direct converter exists.
Returns: The converted text, the row count from the last step that reported one, and the converter chain that ran.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
input |
string | Yes | — | The text to convert, in the source format. |
autoTypes |
boolean | No | true |
Infer number/boolean/null types when parsing CSV rather than treating every cell as a string. |
dialect |
string (mysql|postgres|sqlserver|sqlite) | No | — | SQL dialect for CSV-to-SQL output. Ignored for other target formats. |
table |
string | No | "data" |
Table name for CSV-to-SQL INSERT statements. Ignored for other target formats. |
rootElement |
string | No | "root" |
Root XML element name for JSON-to-XML output. Ignored for other target formats. |
For this tool, use from: "json" and to: "csv".
curl -X POST https://data-migration-tools.com/api/v1/tools/convert \
-H "Content-Type: application/json" \
-d '{"from":"json","to":"csv","input":"[{\"id\":1,\"name\":\"Ada\"},{\"id\":2,\"name\":\"Grace\"}]"}'
See the full API reference for all examples and error codes.