JSON to CSV Converter
Paste your JSON below and get CSV instantly. The conversion happens entirely on your device — nothing is uploaded — so it's safe for private data and works offline once loaded.
Example: JSON → CSV
JSON in
[
{ "name": "Ada", "role": "Engineer" },
{ "name": "Grace", "role": "Admiral" }
]CSV out
name,role
Ada,Engineer
Grace,Admiral
How it works
The converter parses your JSON into an in-memory data structure, then serialises that structure as CSV. Because both steps run client-side in JavaScript, conversion is instant and your data never touches a network. The same engine powers every JSON / YAML / XML / CSV pairing, so results stay consistent across directions — you can round-trip JSON → CSV and back without surprises.
Tips for clean CSV
- Use the From / To selectors to switch formats, or the ⇄ button to reverse the conversion and reuse the output as input.
- Set the indent to match your project's style (2 or 4 spaces).
- Invalid input shows a clear error message pointing at the problem instead of failing silently.
Good to know
This JSON to CSV converter turns structured JSON text into comma-separated values that spreadsheet apps like Excel, Google Sheets, and Numbers can open directly. It is aimed at developers exporting API responses, analysts who receive data dumps as JSON, and anyone who needs to move records out of a JSON file and into a table without writing a script.
Reach for it when you have an array of objects — for example a list of users, orders, or log entries — and you want each object to become a row. Paste the JSON on the left and the CSV appears instantly; the first line is the header, built from the union of every key across all objects, so a record missing a field simply leaves that cell blank rather than breaking the layout. Copy the result into a .csv file or paste it straight into a spreadsheet.
To read the output correctly, remember that the tool follows RFC 4180 quoting: any value containing a comma, double quote, or line break is wrapped in double quotes and internal quotes are doubled. That is why some cells appear quoted and others do not — it is intentional and keeps the file parseable. If a row looks shifted by a column when you open it, the usual cause is a stray comma or quote that was correctly escaped but misread by an import setting.
One caveat: CSV is a flat, two-dimensional format, so deeply nested objects or arrays inside a field do not expand into neat columns — they tend to be stringified into a single cell. Flatten your JSON first (one level of plain key/value pairs per object) for the cleanest result, and validate that your input is real JSON, since a trailing comma or single quotes will trigger an error instead of converting.
Frequently asked questions
What JSON shape does CSV export expect?
An array of flat objects works best — each object becomes a row and the union of all keys becomes the header. A single object exports as one data row; an array of values exports as a single column.
How are commas and quotes handled?
Fields containing commas, quotes or line breaks are automatically wrapped in double quotes and internal quotes are escaped, following RFC 4180 CSV rules.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser using JavaScript — your data never leaves your device and nothing is sent to a server.
Is this converter free?
Yes, completely free with no sign-up, and no limits. It even works offline once the page has loaded.
People also ask
How do I open the converted CSV in Excel?
Save the output to a file with a .csv extension and double-click it, or in Excel use Data > From Text/CSV to import it so you control delimiters and encoding. Pasting the text directly into a sheet also works, though Excel may need Text to Columns to split it.
What is the difference between JSON and CSV?
JSON is a hierarchical format that can nest objects and arrays and preserves data types, while CSV is a flat table of rows and columns where every value is plain text. CSV is easier for spreadsheets, but it cannot represent nested structures without flattening them first.
Can I convert nested JSON to CSV?
You can, but nested objects or arrays usually end up as text inside a single cell rather than separate columns, because CSV has no concept of nesting. Flatten the JSON into one level of key/value pairs per record beforehand for usable columns.
Why does my JSON to CSV conversion fail or show an error?
The most common causes are invalid JSON such as trailing commas, single quotes instead of double quotes, unquoted keys, or comments. Validate the JSON structure first, since the converter needs strictly valid JSON to parse the data.
Does the converter keep the order of my columns?
Column order is derived from the order keys first appear across the objects in your array, and the header is the union of all keys found. Records that omit a key get an empty value in that column rather than a missing one.
How are empty values, null, and booleans handled in the CSV?
Booleans typically appear as true or false text and null usually becomes an empty cell or the word null depending on the data, since CSV stores everything as text. There is no separate data type in CSV, so check how your spreadsheet interprets these after import.
Is there a size limit for the JSON I can convert?
Because the conversion runs entirely in your browser, the practical limit is your device's available memory rather than a server cap. Very large files may briefly slow the browser tab while they are processed.
Can I convert CSV back into JSON?
Yes, the same engine works in reverse, and CalcCafe provides a separate CSV to JSON converter for that direction. Round-tripping flat data should return an equivalent structure without surprises.
Related converters