JSON to CSV Converter
Paste a JSON array of objects to get a CSV file with a header row, ready for a spreadsheet.
Questo contenuto è in inglese.
Esempi svolti
Two records with different fields
[{"name":"Asha","city":"Leeds"},{"name":"Ben","age":34}]
name,city,age Asha,Leeds, Ben,,34
Columns are collected from every record, so the missing fields are left blank and the rows still line up.
Nested address into a column
[{"id":1,"address":{"city":"York"}}]
id,address.city 1,York
A nested object becomes a column named with a dot, as described above.
Informazioni su JSON to CSV Converter
A JSON to CSV converter turns a list of records into a table that opens neatly in a spreadsheet. Paste an array of objects and each object becomes a row, while the keys become column headings. Records with different fields are lined up automatically, with blank cells where a value is missing.
Nested objects are flattened into columns such as address.city, and lists inside a record are kept as JSON text in a single cell. Values containing commas, quotation marks or line breaks are wrapped in quotes correctly. You can choose a comma, semicolon or tab as the separator and download the file ready to open.
Come usare JSON to CSV Converter
- Paste your JSON into the input box.
- Choose the separator and whether to include a header row.
- Decide whether nested objects should be flattened into separate columns.
- Copy the CSV or download it as a file.
Usi comuni
- Opening data from a service in a spreadsheet
- Preparing records for import into another system
- Sharing results with colleagues who prefer tables
- Checking the shape of a set of records at a glance
Domande frequenti
How do I convert JSON to CSV?
Paste a JSON array of objects into the input box. The CSV appears straight away, with a header row built from the keys. Copy the text or download it as a file. A single object is also accepted and becomes a table with one row.
What happens to nested objects and lists?
With flattening on, a nested object such as an address with a city becomes a column called address.city. Lists are not split across rows, so they are kept as JSON text in one cell. Turn flattening off to keep each nested object as JSON text instead.
What if my records have different keys?
The columns are collected from every record, in the order they first appear. A record that lacks a key simply gets an empty cell in that column, so every row has the same number of columns and the table stays aligned.
Which separator should I choose?
A comma is the usual choice. Some spreadsheet settings, particularly in parts of Europe, expect a semicolon instead, and a tab works well for pasting straight into a sheet. If a file opens with everything in one column, try a different separator.
Why does the tool say my JSON is invalid?
JSON needs double quotes around keys and text, no trailing commas, and matching brackets. The message shows what the parser found wrong. If your data is a single value rather than an object or a list, wrap it in an object or array first.