JSON and CSV
Convert JSON to CSV and CSV to JSON with nested-object flattening and cell protection.
Start the toolDescription
A browser-based tool that converts JSON arrays to CSV tables and back. It supports a chosen delimiter, flattening of nested objects with your own depth and key separator, rebuilding them on the way back, and a table preview with row and column counts.
How to use it
- Choose the direction: JSON to CSV or CSV to JSON.
- Paste your data or open a file from your device.
- Adjust the options if needed and press “Convert”.
- Review the preview, then copy or download the result, or press “Reverse direction” to convert it back.
How it works
The input is validated first. For CSV output, columns are collected from every row (not just the first), nested objects are flattened into columns such as address.city, and arrays become JSON text inside the cell. Cells starting with = + - or @ are protected against formula injection in spreadsheet apps. For JSON output, numbers and booleans are converted to real types, and objects and arrays can be rebuilt from flattened columns.
Frequently asked questions
How are nested JSON objects converted to CSV?
Nested objects are flattened into columns such as address.city, up to the depth you choose. Arrays are stored as JSON text inside the cell, and you can rebuild them when converting back.
Does it protect against CSV formula injection?
Yes. Cells that start with =, +, - or @ are neutralised so spreadsheet apps do not run them. You can turn this off in the options.
Can I choose the delimiter?
Yes. Comma, semicolon and tab are all supported. Semicolon is useful in regions where the comma is the decimal separator.
What happens with large numbers?
Integers larger than 2^53 can lose precision in JavaScript. The tool warns you when it detects such values so you can decide before downloading.
Can I preview the result first?
Yes. The tool shows a preview of the converted output before you download, so you can confirm the structure and delimiter are correct.