JSON to CSV and CSV to JSON
Turn a list of JSON records into a spreadsheet file, or turn a CSV into JSON.
Your data is converted in your browser and is never uploaded.
How to convert JSON to CSV
- Choose JSON to CSV and paste a list of records, for example [{"name":"Ali","age":30},{"name":"Sara","age":28}].
- Pick the separator. Comma is standard. Use Semicolon if your spreadsheet program expects it.
- Press Convert, then copy the CSV or download it and open it in Excel or Google Sheets.
How to convert CSV to JSON
- Choose CSV to JSON and paste your CSV. The first line must hold the column names.
- Choose the separator. Each later line becomes one JSON object with those names as keys.
- Leave the number option on to get real numbers and true or false values, or turn it off to keep everything as text.
How nested data is handled
A CSV file is a flat table, but JSON can hold objects inside objects. When you convert JSON to CSV, nested parts are flattened with dots in the column name. For example {"user":{"name":"Ali"}} becomes a column called user.name, and a list item becomes tags.0, tags.1 and so on. If some records have fields that others lack, the columns of all records are combined and the gaps are left empty. Going back from CSV to JSON gives a flat result, because the dots are kept as part of the names.
Things to know
- Values with commas, quotes or line breaks are put in quotes in the right way.
- Leading zeros, as in phone numbers like 00923, are lost when numbers are converted. Turn the number option off for such columns.
- Download for CSV adds a marker so that Excel reads letters outside English correctly.
- To check or tidy JSON first, use the JSON Formatter. To print the table, use CSV to PDF.
Questions about JSON and CSV
Is my data uploaded? No. It is converted in your browser.
What does my JSON need to look like? A list of objects works best. A single object is treated as one row.
Why do my columns look wrong? The separator may be different. Change it to Semicolon or Tab and convert again.