JSON tool
JSON ↔ CSV
Convert arrays of JSON objects to CSV and CSV tables back to JSON. Copy or download the result.
Result
Your result will appear here.
How to use JSON ↔ CSV
- Select a conversion direction.
- Paste a JSON array or CSV table, then convert, copy, or download.
Example
[{"name":"Alice","role":"Developer"},{"name":"Bob","role":"Designer"}]Common use cases
- Exporting an array of API response records to a spreadsheet for quick filtering or for sharing with someone who does not use code.
- Turning a spreadsheet export into JSON so that a test fixture or a seed script can read it.
- Checking that a CSV file from a vendor has the same number of fields in every row before importing it.
Input and output examples
| Input | Output | Notes |
|---|---|---|
[{"name":"Alice","role":"Developer"},{"name":"Bob","role":"Designer"}] | name,role
Alice,Developer
Bob,Designer | JSON → CSV. Rows are separated by CRLF line breaks, which are not shown here. |
id,label
1,"a, b"
2,c | [
{
"id": "1",
"label": "a, b"
},
{
"id": "2",
"label": "c"
}
] | CSV → JSON. The quoted comma stays inside the value, and numbers stay text. |
Common mistakes to avoid
- Spreadsheet formula injection: a cell that starts with =, +, -, or @ can run as a formula when Excel or Google Sheets opens the file. The tool does not change such cells, so review untrusted data before you open it.
- Leading zeros are lost in spreadsheets. A ZIP code such as 01234 can be shown as 1234 when Excel opens the file. The converter keeps the text you wrote.
- Nested objects become JSON text inside one cell, which is hard to filter or sort. Flatten the records first when the spreadsheet needs separate columns.
Technical details
CSV output quotes any field that contains a comma, a double quote, or a line break, and doubles any embedded quote, which follows the conventions of RFC 4180. Rows are separated by CRLF line breaks. JSON input must be an array of objects; the header row is every key in order of first appearance. The CSV parser requires each row to have the same number of fields as the header.
Frequently asked questions
Can I convert nested JSON objects?
This tool is intended for flat records. A nested object is written as JSON text inside its CSV cell.
Why are all values strings when I convert CSV to JSON?
CSV has no type information, so every cell is text. The value 1 comes back as "1", and an empty cell comes back as an empty string.
What happens when objects have different keys?
The header contains every key that appears in any object. A row that lacks a key gets an empty cell. For [{"a":1},{"b":2}] the result is a,b, then 1, and then an empty cell followed by 2.
Why does a line in my CSV look split across rows?
A quoted cell can contain a line break. Spreadsheets show it as one cell, but a plain text editor shows it as several lines.
Why is my CSV rejected for column count?
Every row must have the same number of fields as the header. A comma inside an unquoted value creates an extra field, so quote that value.
Is my file uploaded?
No. The file is read in your browser, and the tool code does not send it to a server.