How to convert JSON to CSV
- Paste a JSON array of objects into the left box, an API response, a MongoDB export, or anything shaped like
[{…}, {…}]. Click Sample to see the expected structure. - The CSV builds live. The header row is the union of every key found across all objects, so nothing is dropped even when records differ.
- Pick a Delimiter if you need something other than a comma, Semicolon is the safe choice for many European locales where Excel expects it.
- Click Download .csv to open it straight in Excel, Google Sheets or Numbers, or Copy output to paste it elsewhere.
Why convert JSON to CSV?
JSON is the format programs talk in; a spreadsheet is the format a finance team, a marketer, or a client actually opens. The gap shows up constantly: you pull a list of orders from an API, or a table of users from a database, and someone asks for "just a spreadsheet." Rather than writing a one-off export script, you paste the JSON here and get a grid of rows and columns you can sort, pivot and chart. Because the conversion is the mirror image of a spreadsheet import, this pairs naturally with CSV to JSON for round-tripping data in and out of code.
The hard part of JSON-to-CSV is the messy real data, and that is what this tool gets right. Objects rarely share the exact same keys, one order has a discount field and the next does not, so the converter scans every object and creates a column for each key it sees, leaving the cell blank where a record lacks that field. Values that contain the delimiter, a double quote, or a newline are wrapped in quotes and escaped per RFC 4180, so a product description with a comma in it never spills into the next column. The result opens cleanly instead of shifting halfway down the sheet.
How nested JSON becomes flat columns
CSV is a flat grid: every cell holds one value. JSON is a tree, so something has to give when a field is itself an object or an array. Take a record like {"name":"Ada","tags":["git","linux"],"address":{"city":"London"}}. The scalar name maps straight to a cell, but tags and address have no single value. Rather than lose them, the converter writes the nested structure back as a compact JSON string inside that one cell, so the tags column holds ["git","linux"] as text. Nothing is discarded, and if you re-import the file later the nested value is still there to parse. When you would rather have real columns like address.city, flatten the JSON in your code before pasting it here, or drop the nested keys you do not need. For a plain, already-flat array of objects, every field lands in its own tidy column with no strings-in-cells at all.
Frequently asked questions
What JSON shape can be converted?
The ideal input is an array of objects: each object becomes a row and each key becomes a column. A single object works too and produces one data row, and objects with different keys are merged so the header covers every field that appears anywhere in the array.
What happens when objects have different keys?
The converter takes the union of all keys across the array and makes one column per key. If a particular object is missing a field, that cell is simply left empty, you get a rectangular table with no misaligned rows.
What happens to nested objects and arrays?
They are written into their cell as a compact JSON string rather than being dropped, so no data is lost. If you want flat columns such as address.city, flatten the structure in code before converting.
How do I open the result in Excel without broken columns?
Click Download .csv and open it directly. Values containing commas, quotes or line breaks are quoted and escaped, so columns stay aligned. If your regional Excel splits on semicolons, switch the Delimiter to Semicolon before downloading.
Why do I get an error instead of a table?
The input has to be valid JSON. If it fails, the value is probably not parseable, a trailing comma, single quotes or a stray bracket. Run it through the JSON Formatter first to find the exact line, then convert.
Is my JSON data uploaded to a server?
No. The conversion runs entirely in your browser, so API responses, database exports and customer records never leave your machine.