How JSON becomes rows and columns
Each item of the array becomes a row, and each key a column; the columns are every key that appears in any item, in the order they first appear, so items with different keys are handled. If the JSON isn't an array itself, the tool uses the largest array inside it, such as $.data.items in a typical API response; choose another under Rows from.
- Flatten to columns turns
{"address": {"city": "London"}}into anaddress.citycolumn. - Keep as JSON puts the nested object in one cell as JSON text.
- Arrays inside an item are always written as JSON text, so no data is lost.
nullbecomes an empty cell;trueandfalseare written as text.
How to use the JSON to CSV
- Paste a JSON array, or press Sample.
- Check which array is used for the rows, and how nested objects are handled.
- Choose a delimiter and, for Excel, the Excel-friendly download.
- Copy the CSV or download it.
Examples
Nested objects flattened
[{"id":1,"name":"Ada","address":{"city":"London","zip":"N1 9GU"},"tags":["admin","ops"]},{"id":2,"name":"Grace, Hopper","address":{"city":"New York"},"active":true,"note":null}]id,name,address.city,address.zip,tags,active,note
1,Ada,London,N1 9GU,"[""admin"",""ops""]",,
2,"Grace, Hopper",New York,,,true,
The second item has keys the first doesn't, so they become extra columns. Grace, Hopper is quoted because it contains a comma.
Rows inside an API response
{"page":1,"data":{"items":[{"sku":"BK-12","price":19.90},{"sku":"PN-03","price":42}]}}sku,price
BK-12,19.90
PN-03,42
The array at $.data.items is used for the rows. The price keeps its trailing zero.
Semicolons for European Excel
[{"product":"Notebook","price":"4,50"},{"product":"Pen","price":"2,00"}]product;price
Notebook;4,50
Pen;2,00
Opening the CSV in Excel
Excel guesses the file's character set and delimiter from your system settings. Excel-friendly download adds a UTF-8 byte-order mark so accents and emoji show correctly. In countries that use a comma as the decimal separator, Excel expects semicolons between fields: choose Semicolon as the delimiter.
Spreadsheets treat a cell starting with =, +, - or @ as a formula, even in a CSV. If the data comes from users, a cell like =HYPERLINK(…) could be harmful when the file is opened. Escape formulas prefixes such cells with an apostrophe, which spreadsheets hide.
Options
- Rows from
- Which array becomes the rows, when there's more than one. The largest is chosen by default.
- Nested objects
- Flatten to dotted columns (the default) or keep each nested object as JSON in one cell.
- Delimiter
- Comma (the default), semicolon, tab or pipe.
- Excel-friendly download
- Adds a UTF-8 byte-order mark to the downloaded file so Excel reads accents correctly.
- Escape formulas
- Prefixes cells starting with =, +, - or @ with an apostrophe to stop spreadsheets running them.
Limitations
- Arrays inside items are written as JSON text, not spread across columns or rows.
- Inputs up to 10 MB.
Frequently asked questions
Is my data uploaded?
No. The conversion runs in your browser; nothing you paste is sent anywhere.
Why does Excel show strange characters?
Excel doesn't assume UTF-8. Download with Excel-friendly download on, or use Data > From Text/CSV and choose UTF-8.
Why is everything in one column in Excel?
Your Excel expects a different delimiter, usually a semicolon where the comma is the decimal separator. Choose Semicolon and download again.
How do I convert CSV back to JSON?
Use the CSV to JSON converter.