---
title: "JSON to CSV"
method: POST
path: "/api/v1/tools/json-to-csv"
tags: ["tools"]
---

# JSON to CSV

`POST /api/v1/tools/json-to-csv`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/json-to-csv`
- Auth: HTTP bearer

Turn a JSON array of objects, or a JSON string holding one, into CSV text. Nested objects become dotted column names such as address.city, arrays are written as JSON inside the cell, and every key seen in any row becomes a column.

## Request body

- object
  - `json` string
  - `delimiter` string
  - `includeHeader` boolean
  - `flatten` boolean

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `csv` string
    - `columns` string[]
    - `rowCount` integer

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
