JSON ↔ CSV converter
Paste a JSON array or CSV text and convert between formats with one click. Headers are auto-detected from JSON keys.
About this tool
JSON and CSV describe data in fundamentally different shapes, and converting between them is a lossy operation in one direction. CSV is a flat grid: rows and columns, every value a string, no types and no nesting. JSON is a tree with real types — numbers, booleans, null, nested objects, arrays. Flattening a tree into a grid means deciding what to do with the parts that do not fit, and going the other way means guessing at types that CSV never recorded. That is where the friction lives. An array of flat objects converts cleanly in both directions. Add a nested object and you must choose between a dotted column name, a JSON string in the cell, or dropping the field. The format itself is also less standard than it appears: RFC 4180 defines comma separators and double-quote escaping, but real files use semicolons in locales where the comma is a decimal separator, and encodings vary. This converter turns an array of JSON objects into CSV and CSV rows back into JSON, deriving headers from object keys, and runs in your browser.
- 1
Paste a JSON array of objects to convert it to CSV, or paste CSV rows to convert to JSON.
- 2
The tool detects the direction automatically based on your input.
- 3
Column headers are derived from the JSON object keys.
- 4
Click Copy or download the result as a file.
Export JSON API responses to CSV for analysis in Excel or Google Sheets.
Import CSV data from spreadsheets into your app as JSON arrays.
Quickly validate the shape of a JSON dataset by viewing it as a table.
JSON array to CSV
[{"name":"Alice","age":30},{"name":"Bob","age":25}]name,age
Alice,30
Bob,25CSV to JSON
name,age
Alice,30
Bob,25[{"name":"Alice","age":"30"},{"name":"Bob","age":"25"}]Nested objects appear as [object Object] in the CSV
Cause: CSV has no representation for a nested structure. A value that is itself an object or array cannot occupy a single flat cell without being encoded somehow.
Fix: Flatten the JSON before converting, promoting nested fields to top-level keys with names like address_city. For arrays of varying length, consider one row per item with a repeated parent identifier.
Leading zeros or long numbers are mangled after a spreadsheet round trip
Cause: This is the spreadsheet, not the conversion. Excel and Sheets aggressively infer types, stripping leading zeros from postcodes and IDs and converting long digit strings to scientific notation.
Fix: Import the CSV rather than double-clicking it, and set the affected columns to text during import. Prefixing values with an apostrophe or quoting them does not survive every path.
Columns shift on some rows
Cause: A field contains the delimiter, a quote, or a newline and was not quoted or escaped correctly — a comma inside an address is the classic case.
Fix: Ensure fields containing commas, quotes, or line breaks are wrapped in double quotes with internal quotes doubled, per RFC 4180. If the source uses semicolons as separators, convert those before parsing.
These answers explain common json ↔ csv tasks, expected input formats, and edge cases so both visitors and search engines can understand what this tool does.
What JSON structure does the JSON→CSV converter accept?
It expects an array of objects at the top level, e.g. [{"name":"Alice","age":30},{"name":"Bob","age":25}]. Nested objects are stringified into the cell value.
Does the CSV→JSON converter handle quoted fields?
Yes. Fields wrapped in double quotes (including those containing commas or newlines) are parsed correctly.
Are my files uploaded anywhere?
No. All conversion happens in your browser using JavaScript. Nothing is sent to a server.
Does the JSON to CSV converter handle nested objects?
Nested objects and arrays are serialised as JSON strings within the CSV cell rather than being flattened into separate columns. If you need flat columns, flatten your JSON structure before converting.
Can I open the CSV output in Excel or Google Sheets?
Yes. Copy the CSV output and paste it into a new Google Sheet, or save it as a .csv file and open it in Excel. Both applications detect comma-separated values automatically.