Which formats can I convert between?
json, csv, tsv, ndjson, xml, yaml, and xlsx. POST /convert with inputFormat, outputFormat, and data.
Convert JSON, CSV, YAML, XML, NDJSON, and XLSX with nested-value policies and spreadsheet formula escaping by default.
This calls POST /convert on the live Data Format Convert API. Edit a tiny JSON array and pick json, csv, or yaml.
Converting records...
Why Data Format Convert API
Seven structured formats
JSON, CSV, TSV, NDJSON, XML, YAML, and XLSX in a single convert contract.
Nested values under control
Flatten nested objects into columns, or JSON-stringify them when a single cell is enough.
Formula-safe spreadsheets
Values that look like formulas are escaped by default. Reject or preserve when your pipeline needs it.
XLSX as base64
Workbook input and output travel as base64 inside JSON. Sheet name or index is selectable.
Conversion metadata
Columns, observed types, null counts, record count, and output size come back with every result.
No remote files
XML entity expansion is disabled. YAML uses a JSON-compatible safe schema. Nothing is stored.
/api/v1/data-format-convert
Convert records
Transform JSON, CSV, TSV, NDJSON, XML, YAML, or XLSX with nested-value and formula options.
| Parameter | Type | Required | Description |
|---|---|---|---|
| inputFormat | string | yes | json, csv, tsv, ndjson, xml, yaml, or xlsx. |
| outputFormat | string | yes | json, csv, tsv, ndjson, xml, yaml, or xlsx. |
| data | string/object/array | yes | Source payload. XLSX uses base64. |
| options.formulaPolicy | string | no | escape (default), reject, or preserve. |
| options.nestedValues | string | no | flatten (default) or json-stringify. |
| options.includeHeaders | boolean | no | Include delimited headers. Defaults to true. |
Error reference
Invalid format, data type, or option.
Missing or invalid gateway API key. Send x-api-key or api_key with every request.
Body exceeds the transport limit.
Malformed source or conversion failure.
More than 120 requests in a 15-minute window.
Example error response
{
"success": false,
"error": { "code": "CONVERSION_ERROR", "message": "Unable to parse input" },
"correlationId": "1784849006651-df01"
}FAQ
json, csv, tsv, ndjson, xml, yaml, and xlsx. POST /convert with inputFormat, outputFormat, and data.
Tabular output escapes values that begin with formula characters by default. Set options.formulaPolicy to reject or preserve when you need a different policy.
Yes. options.nestedValues=flatten (default) expands nested objects. json-stringify keeps nested values as JSON strings in a single cell.
XLSX uses base64 transport in JSON. Text formats return a string. The response always includes recordCount and conversionMetadata.
Send your Datpaq API key as an x-api-key header or an api_key query parameter. Keys are created in the Datpaq dashboard and a free tier is included.
JSON, CSV, and YAML with option flags for headers, pretty printing, and key sorting.