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)
→ Convert this JSON to CSV.
1name,age,city
2Alice,30,New York
3Bob,25,LondonLove 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.
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
- JSON to CSV - generic array conversion.
- Nested JSON to CSV - convert nested order-style records.
- Flatten API Response JSON - inspect response paths before export.
- API response formatter - clean vendor payloads first.
Related tools
- CSV to JSONParse CSV text into a JSON array of row objects for further cleanup or reshaping
- Table JSON to RecordsConvert table-like JSON exports with header and row arrays into normal JSON records
- Format ValuesReformat individual values with case changes, trimming, coercion, and slugification
- Map ValuesRemap existing values through a lookup table such as enums, codes, or category names
- Compute FieldCreate derived values or fields from formulas, expressions, and simple conditionals
Read more on the blog
Advanced usage (optional)
JSON to CSV
v1.0.0Description
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
| Field | Type | Default | Description | |
|---|---|---|---|---|
| Delimiter | enum | , | Field separator: ,, ;, \t (tab), or `\ | ` (pipe) |
| Include Headers | boolean | true | Add column names as the first row | |
| Columns | json | [] | JSON array of field names to include (empty = all fields) | |
| Flatten Nested Objects | boolean | false | Flatten nested objects using dot notation keys (e.g., user.name) | |
| Array Delimiter | string | `\ | ` | Character to join array values within a single cell |
| Column Mapping | column-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
| Name | Type | Default | Description |
|---|---|---|---|
| Delimiter | enum | , | Character used to separate fields in the CSV output , ; \t | |
| Include Headers | boolean | true | Add column names as the first row |
| Flatten Nested Objects | boolean | false | Flatten nested objects using dot notation keys (e.g. user.name) |
| Array Delimiter | string | | | Character to join array values within a single cell |
| Columns | json | [] | 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
Convert this JSON to CSV.1name,age,city
2Alice,30,New York
3Bob,25,London1[]API Usage
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":"|"}}'1name,age,city
2Alice,30,New York
3Bob,25,London