API JSON to CSV Converter

Turn REST, GraphQL, webhook, and SDK response data into CSV for reporting, QA review, analytics, and spreadsheet handoff.

Paste your JSON → Get CSV instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Convert this JSON to CSV.

[
{
"name": "Alice",
"age": 30,
"city": "New York"
},
{
"name": "Bob",
"age": 25,
"city": "London"
}
]
Output
1name,age,city
2Alice,30,New York
3Bob,25,London

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • REST API responses
  • GraphQL result arrays
  • Webhook event data
  • Analytics and QA exports

Example: input → output

API JSON to CSV converter

Convert API JSON to CSV when the input is a REST, GraphQL, webhook, or SDK response rather than a clean local array. This page uses the same runner as the JSON to CSV converter, but it focuses on response wrappers, data arrays, nested objects, and export workflows.

Input
{
  "data": [
    { "id": "evt_1001", "customer": { "name": "Alice" }, "status": "paid" },
    { "id": "evt_1002", "customer": { "name": "Ben" }, "status": "refunded" }
  ],
  "nextCursor": "cursor_abc"
}

Output
id,customer.name,status
evt_1001,Alice,paid
evt_1002,Ben,refunded

How to export API JSON as CSV

Paste the response body, choose the record array you want to export, flatten nested response fields, and run the converter. The CSV should contain business fields, not pagination metadata such as nextCursor, request IDs, or trace IDs.

For paginated endpoints, combine pages before the final export. For response data with noisy nulls or debug fields, clean it first with Clean JSON or extract only stable paths before converting.

When to use this tool

Use this page when the source is an API response and the destination is a spreadsheet, QA report, analytics workflow, or ETL handoff:

  • Export REST endpoint records for a product or support team.
  • Turn webhook event samples into CSV for debugging.
  • Review GraphQL result arrays in Google Sheets.
  • Prepare vendor API data before loading it into BI tools.

API response pitfalls

Do not export volatile metadata unless the report needs it. Fields like requestId, traceId, timestamps, signatures, and cursors can make every export look different. Keep the useful records, flatten nested objects intentionally, and preserve IDs or statuses that downstream teams need to join or filter the CSV.

Related tools

Read more on the blog

Advanced usage (optional)

JSON to CSV

v1.0.0
Convert
arrayreversible

Description

JSON to CSV

Convert a JSON array of objects into CSV text. Supports field selection, nested object flattening, custom column mappings with expressions, and configurable delimiters.

How It Works

The utility takes an array of objects and produces CSV text. Each object becomes a row, and object keys become column headers.

Basic Conversion

All fields from the first object determine the columns. Values are quoted when they contain the delimiter character.

Column Selection

Specify an array of field names to include only certain columns in a specific order.

Nested Object Flattening

When enabled, nested objects are flattened using dot notation. Arrays within cells are joined with a configurable delimiter.

Custom Column Mapping

Define custom columns with expressions using {{fieldName}} syntax. Allows combining fields, renaming columns, and applying transformations.

Configuration

FieldTypeDefaultDescription
Delimiterenum,Field separator: ,, ;, \t (tab), or `\` (pipe)
Include HeadersbooleantrueAdd column names as the first row
Columnsjson[]JSON array of field names to include (empty = all fields)
Flatten Nested ObjectsbooleanfalseFlatten nested objects using dot notation keys (e.g., user.name)
Array Delimiterstring`\`Character to join array values within a single cell
Column Mappingcolumn-mapping[]Define custom column mappings with expressions. When configured, overrides Columns and Flatten settings.

Column Mapping Expressions

Custom mappings let you define exactly what each column contains:

Column: "Full Name"     Expression: "{{firstName}} {{lastName}}"
Column: "Age"           Expression: "{{age}}"
Column: "Location"      Expression: "{{city}}"

Use Cases

Data Export

  • Spreadsheet export: Convert JSON data to CSV for Excel or Google Sheets
  • Database import: Prepare CSV files for database bulk import
  • Report generation: Export filtered data as CSV reports

Data Transformation

  • Column selection: Export only relevant fields from large objects
  • Field combination: Merge first/last name into a single "Full Name" column
  • Nested flattening: Convert hierarchical data to flat CSV rows

Integration

  • Legacy systems: Convert JSON API data to CSV for legacy system import
  • Email tools: Prepare CSV contact lists for email marketing tools
  • Analytics platforms: Export data in CSV format for analytics tools

Configuration

NameTypeDefaultDescription
Delimiterenum,Character used to separate fields in the CSV output , ; \t |
Include HeadersbooleantrueAdd column names as the first row
Flatten Nested ObjectsbooleanfalseFlatten nested objects using dot notation keys (e.g. user.name)
Array Delimiterstring|Character to join array values within a single cell
Columnsjson[]JSON array of field names to include (empty = all fields)
Column Mapping (Advanced)column-mapping[]Define custom column mappings with expressions. When configured, overrides Columns and Flatten settings.

Examples

AI Prompt
Convert this JSON to CSV.
[
{
"name": "Alice",
"age": 30,
"city": "New York"
},
{
"name": "Bob",
"age": 25,
"city": "London"
}
]
Output
1name,age,city
2Alice,30,New York
3Bob,25,London
Config
Delimiter
,
Include Headers
ON
Flatten Nested Objects
OFF
Array Delimiter
|
Columns
1[]

API Usage

POST /api/v1/utilities/convert.json-to-csv
Example:
curl -X POST https://your-domain.com/api/v1/utilities/convert.json-to-csv \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":[{"name":"Alice","age":30,"city":"New York"},{"name":"Bob","age":25,"city":"London"}]},"config":{"delimiter":",","includeHeaders":true,"columns":[],"flattenNested":false,"arrayDelimiter":"|"}}'
Response
1name,age,city
2Alice,30,New York
3Bob,25,London