Convert JSON to CSV
Turn API responses and exports into a spreadsheet-ready CSV without your data leaving the page.
Output
Paste or type above to see the result here.
Your files stay on your device
This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.
Example
Example: volunteer sign-ups from a web form’s API, opened in a spreadsheet
A school fair’s sign-up form returns three volunteers as JSON: names, emails, shifts and shirt sizes, plus an address object on one, a note with a comma in it on another, and a null shirt size and a list of roles on the third. Delimiter: Comma (,).
- The header is every key in the order it first appears: name, email, shift, shirt, address, notes, roles. That makes 7 columns and 3 rows.
- Keys an object does not have, and the null shirt size, become empty cells.
- The address object and the roles list go into their cells as JSON text. The note is quoted because of its comma, and the quotes in Cara "CJ" Test are doubled.
| name | shift | shirt | address | notes | roles | |
|---|---|---|---|---|---|---|
| Ava Sample | ava@example.com | Sat 9-12 | M | {"city":"Austin","state":"TX"} | ||
| Ben Example | ben@example.com | Sat 12-3 | L | Can bring a canopy, 10x10 | ||
| Cara "CJ" Test | cj@example.com | Sun 9-12 | ["setup","grill"] |
A CSV of four lines, the header and three rows, to copy or download as a .csv file. Opened in a spreadsheet each value sits in its own cell, as above; split the address into city and state there if you need them as columns.
How it works
- Paste JSON into the input box. It should be an array of objects, such as the result of an API call. A single object is treated as a one-row array.
- Choose the delimiter. Comma is the standard; pick Semicolon if your Excel uses a comma as decimal separator, or Tab for pasting straight into a spreadsheet.
- The result appears as you type. The header row is built from the union of all keys, in order of first appearance.
- Copy the result or download it as a .csv file and open it in Excel, Google Sheets or Numbers.
Frequently asked questions
- Is my JSON sent anywhere?
- No. The conversion is plain JavaScript running in the page. Nothing is uploaded, and the tool works offline.
- What happens with nested objects and arrays?
- The tool expects flat objects. Any value that is itself an object or array is written into the cell as a JSON string, so no data is lost, but it will not be split into separate columns.
- What if objects have different keys?
- Every key found in any object becomes a column. Objects that lack a key get an empty cell in that column.
- How are commas and quotes inside values handled?
- Values containing the delimiter, double quotes or line breaks are wrapped in double quotes, with inner quotes doubled, as required by RFC 4180. Excel and Sheets read this correctly.
- Why does Excel show everything in one column?
- Excel on some locales expects a semicolon delimiter. Re-run the conversion with Semicolon selected, or use Excel's Data > From Text import and pick the delimiter there.
- Why do ZIP codes lose their leading zero?
- The CSV keeps it: a ZIP code written as text in the JSON, "02134", comes out as 02134. Spreadsheets turn it into the number 2134 when they open a CSV directly. Import the file instead (in Excel, Data > From Text) and set that column to Text.
- What are the free limits?
- The free plan allows 5 runs per day. Pro removes this limit.
Related tools
⇄ CSV to JSON Turn spreadsheet exports into JSON for APIs, scripts and config files, without your data leaving the page. ⇄ JSON to YAML Paste JSON, get YAML. It runs in this page, not on a server. ▦ CSV to Excel A proper .xlsx from your CSV, written on your device. ▦ Excel to CSV Your workbook as CSV files, read on your device.