Skip to content
{}
APIs & data handoff

JSON to CSV Converter

Convert a JSON array to CSV with explicit rules for nested objects, arrays, and nulls — and verify what survives the round trip.

Round-trip verified

Output rules

Handling

JSON

0 characters

CSV

Not converted

Columns produced

Convert something to see the column list.

Round-trip verification

Converts the JSON to CSV and straight back with the same rules, then compares the result value by value. Anything CSV cannot represent shows up here rather than three weeks later in production.

Files are read into this browser tab only — there is no upload endpoint and no payload in the URL. See how local processing works.

How to Convert JSON to CSV

Paste a JSON array of objects into the input panel. Each object in the array becomes a row, with keys as column headers. Click Convert to generate CSV.

What is JSON?

JSON is a flexible data format that can represent complex nested structures. However, for tabular data analysis, CSV format is often more practical.

What is CSV?

CSV (Comma-Separated Values) is a simple tabular format where each line is a row and values are separated by commas. It's universally supported by spreadsheet applications and databases.

Common Use Cases

Convert JSON to CSV when exporting API data to spreadsheets, preparing data for analysis in Excel or Google Sheets, or importing data into databases that accept CSV.

Convert JSON to CSV in Code

For repeatable pipelines, do the conversion in code. These snippets convert an array of objects to CSV:

Python (pandas)

import pandas as pd
pd.read_json("data.json").to_csv("data.csv", index=False)

jq

jq -r '(.[0] | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' data.json

Node.js

const rows = require("./data.json");
const keys = Object.keys(rows[0]);
const csv = [keys.join(","), ...rows.map(r => keys.map(k => JSON.stringify(r[k] ?? "")).join(","))].join("\n");

Frequently Asked Questions

What JSON structure works best for CSV conversion?

An array of flat objects works best. Each object becomes a row, and object keys become column headers.

How are nested objects handled?

Nested objects are flattened using dot notation. For example, {address: {city: "NYC"}} becomes address.city column.

Can I open the CSV in Excel?

Yes, the generated CSV is fully compatible with Excel, Google Sheets, and other spreadsheet applications.

Are special characters handled correctly?

Yes, values containing commas, quotes, or newlines are properly escaped following RFC 4180 CSV standard.

APIs & data workflow

Continue with the data, not the directory

Prepare CSV, XML, tables, SQL, and DynamoDB payloads for the next system in the workflow.

Browse apis & data handoff