JSON ⇄ CSV Converter
A JSON to CSV converter turns an array of JSON objects into a spreadsheet-ready table — handy when an API hands you data you need in Excel or Google Sheets. Paste your JSON and download the CSV; the tool also converts CSV back to JSON when you need the reverse. The guide below covers how nested data is handled, the quoting rules that keep your data intact, and what to expect from the reverse conversion.
What the conversion does
JSON to CSV is a shape change: a list of objects becomes rows and columns. Given this JSON:
[
{"name": "Ava", "role": "Engineer", "active": true},
{"name": "Leo", "role": "Designer", "active": false}
]
You get:
name,role,active
Ava,Engineer,true
Leo,Designer,false
The keys of the first object become the header row; every object after it becomes one data row. It is the same transformation every "JSON to Excel" workflow performs, just without leaving the browser.
How nested objects and arrays are handled
CSV has no native concept of nesting, so this tool serializes nested objects and arrays as JSON strings inside a single cell — it does not flatten them into dot-notation columns. Given [{"user": {"name": "Ava"}, "tags": ["a", "b"]}], you get a user column containing {""name"":""Ava""} and a tags column containing "[""a"",""b""]", with the inner quotes doubled per CSV escaping rules. Nothing is silently dropped, but be aware of two consequences: you cannot sort or filter inside nested cells in a spreadsheet, and converting back to JSON leaves those values as strings rather than restoring the original nesting. If you need sortable columns, flatten the objects (for example with a quick script) before converting.
How to use it
- Choose a direction: JSON → CSV or CSV → JSON.
- Paste your data into the input box — conversion happens as you type, and problems are reported in plain language.
- Copy the result or download it as a file.
What it expects
For JSON → CSV, the input should be an array of flat(ish) objects, or an object containing one. Objects with different keys still convert — the union of all keys becomes the header row and missing values are left empty. For CSV → JSON, the first row is treated as column headers. Malformed input produces a clear error message rather than a silent wrong result.
Quoting and escaping rules
CSV looks simple until a field contains a comma, a quote, or a line break — then quoting matters. This tool follows the standard (RFC 4180-style) rules:
| Situation | Rule | Example |
|---|---|---|
| Field contains a comma | Wrap the whole field in double quotes | "Smith, John" |
| Field contains a double quote | Double the quote, then wrap the field | "She said ""hi""" |
| Field contains a line break | Wrap the field in quotes; the break stays inside | "line one
line two" |
| Plain text or numbers | No quoting needed | 42 |
Excel, Google Sheets, and pandas all understand these rules, so a correctly quoted file opens the same way everywhere.
CSV back to JSON: type guessing
The reverse conversion treats the first CSV row as keys and each subsequent row as an object. Types are inferred, not preserved: values that look like numbers become numbers, "true" and "false" become booleans, and everything else stays a string. That is convenient, but watch out for values where the inference is wrong — a ZIP code like 02139 may come back as the number 2139, and a product code like 007 becomes 7. If exact string preservation matters, normalize the values after conversion.
Frequently asked questions
- How do I convert JSON to CSV online?
- Paste an array of JSON objects into the converter above — conversion happens as you type. Each object key becomes a column header and each object becomes a row. Nested objects and arrays are serialized as JSON strings inside a single cell, so no data is silently dropped. Copy the result or use the Download button to save it as a file.
- How are nested JSON objects handled in CSV conversion?
- They are not flattened — each nested object or array is serialized as a JSON string inside a single cell, with quotes escaped per CSV rules. For {"user": {"name": "Ava"}} you get a user column containing {""name"":""Ava""}. Converting back to JSON leaves that value as a string rather than restoring the original nesting, and you cannot sort or filter inside nested cells in a spreadsheet — flatten the data first if you need that.
- Why does my CSV open in one column in Excel?
- This tool outputs standard comma-delimited CSV. In locales where Excel expects a semicolon list separator, a comma-delimited file lands in a single column. In Excel, use Data > Text to Columns and choose Comma as the delimiter; Google Sheets detects the delimiter automatically on import.
- Can I convert CSV back to JSON?
- Yes — switch the direction to CSV → JSON and paste CSV with a header row. The first line becomes the JSON keys and every following line becomes an object. Note that types are inferred on the way back: values that look like numbers become numbers and "true"/"false" become booleans, so a value like the ZIP code 02139 may come back as the number 2139.
- Is there a file size limit?
- No hard limit is enforced by this tool — since conversion happens in your browser rather than on a server, the practical limit is your own device's memory, not an artificial cap.
- Does my data get uploaded anywhere?
- No. The conversion happens entirely in JavaScript in your browser tab.