What does this tool do?
This free JSON to CSV converter flattens a JSON array of objects into a CSV table you can open in Excel, Google Sheets, or any spreadsheet — and converts CSV back to JSON with the reverse toggle. It runs entirely in your browser, so nothing you paste is uploaded. Coming from a spreadsheet the other way? The dedicated CSV to JSON page turns CSV rows into JSON objects.
What JSON shape does it expect?
The cleanest input is an array of objects, where each object is one row:
[
{ "name": "Ann", "age": 30, "city": "Paris" },
{ "name": "Bob", "age": 25, "city": "Berlin" }
]
The converter collects the union of all keys across the objects to build the header row, so objects that are missing a field simply get an empty cell. A single object (not in an array) is treated as a one-row table.
How quoting works
CSV values that contain a comma, double quote, or newline are automatically wrapped in double quotes, and any inner quotes are doubled — the standard RFC 4180 escaping. Nested objects or arrays inside a cell are written as compact JSON so no data is lost.
Real-world examples
The most common reason to convert JSON to CSV is to take an API response or a database export — a JSON array of objects — and open it as a spreadsheet for analysis or to share with a non-technical colleague. For example, this API response:
[
{ "id": 1, "name": "Ann", "plan": "pro", "mrr": 49 },
{ "id": 2, "name": "Bob", "plan": "free", "mrr": 0 }
]
becomes a clean CSV you can paste straight into Excel or Google Sheets:
id,name,plan,mrr 1,Ann,pro,49 2,Bob,free,0
The keys become the header row and each object becomes a line. A value with a comma, quote or newline — say "Paris, FR" — is quoted automatically so it stays in one column.
Convert JSON to CSV in code (Python, jq, CLI)
This page is the zero-install option; inside a script:
- Python (pandas):
import pandas as pd; pd.read_json("in.json").to_csv("out.csv", index=False)— orpd.json_normalize(data)to flatten nested fields into columns. - jq:
jq -r '(.[0]|keys_unsorted),(.[]|[.[]])|@csv' in.jsonwrites the header row, then one row per object. - Miller:
mlr --ijson --ocsv cat in.jsonconverts a JSON array of objects to CSV.
How to use it
- Paste JSON on the left; the CSV appears live on the right.
- Copy the CSV or Download a
.csvfile ready for your spreadsheet. - Switch the toggle to CSV → JSON to go the other way; the JSON indent control formats that output.
- Invalid JSON shows a clear error message.
Common uses
- Export an API's JSON response into a spreadsheet for analysis or sharing.
- Hand a non-technical colleague a CSV instead of raw JSON.
- Bulk-load data into a tool that only accepts CSV.
FAQ
What JSON shape does the converter expect?
An array of objects, like [{"name":"Ann","age":30}]. Each object becomes a row and the keys become column headers.
How are commas and quotes handled?
Any value containing a comma, quote, or newline is wrapped in double quotes and inner quotes are doubled, following standard CSV (RFC 4180) rules.
What if my objects have different keys?
The converter takes the union of every key across all objects to build the header, and any object missing a field gets an empty cell — no row is dropped.
What about nested objects?
Nested objects and arrays are serialized as compact JSON inside the cell so nothing is dropped.
Can I convert CSV back to JSON?
Yes. Switch the toggle to CSV → JSON, paste CSV, and the first row becomes the keys of a JSON array of objects.
Will the CSV open correctly in Excel?
Yes. It is standard RFC 4180 CSV, and the download is UTF-8, so accented characters and other non-ASCII text come through intact.
Does it work offline?
Yes. Once the page has loaded the conversion runs entirely on your device, with no network connection.
Is my data uploaded?
No. Everything runs in your browser; nothing you paste leaves your device.