JSON to CSV converter that flattens nested objects and arrays
API exports and app backups come as JSON with objects inside objects and lists inside lists. A spreadsheet wants flat rows. Your todo.is agent works out the structure, flattens the nested fields into clear column names, decides how to handle arrays, and gives you a CSV that opens straight in Excel or Sheets.
The prompt
- Convert the attached JSON to CSV: [ATTACH THE JSON]. One row should be one [ROW UNIT]. Flatten nested objects into columns named with dots, like customer.address.city. For arrays, [ARRAY HANDLING]. Keep these fields only: [FIELDS]. Use UTF-8, comma delimiter and ISO dates. Before converting, show me the structure you found and the column list. Then send the .csv and tell me how many records were in the JSON and how many rows are in the CSV.
What to change
- [ATTACH THE JSON]: Attach a .json or .jsonl file, or paste the JSON or an API URL that returns it.
- [ROW UNIT]: E.g. "order", "user", "line item" or "event".
- [ARRAY HANDLING]: E.g. "make one row per item", "join values with a semicolon" or "put them in a separate CSV".
- [FIELDS]: E.g. "id, created_at, customer.email, total" or "all fields".
Example result
- JSON to CSV: orders_export.json
- Top level: an array of 1,250 order objects · converted to one row per line item
- Structure found
- • id, created_at, status, total
- • customer: { id, email, address: { city, country } }
- • items: [ { sku, name, qty, price } ] (1 to 9 items per order)
- • tags: [ "gift", "wholesale" ] (list of strings)
- Columns in the CSV
- order_id, created_at, status, order_total, customer.id, customer.email, customer.address.city, customer.address.country, item.sku, item.name, item.qty, item.price, tags
- How each part was handled
- • Nested objects became dotted column names
- • items array: one row per item, so an order with 3 items gives 3 rows that share the same order_id
- • tags array: joined with a semicolon in one cell ("gift;wholesale")
- • created_at "2026-05-02T14:31:09Z" kept as ISO 8601
- • null values left as empty cells
- Sample rows
- order_id,created_at,status,order_total,customer.email,customer.address.city,item.sku,item.qty,item.price,tags
- A-10021,2026-05-02T14:31:09Z,paid,74.50,lena@example.com,Hamburg,TS-BLK-M,2,19.90,gift
- A-10021,2026-05-02T14:31:09Z,paid,74.50,lena@example.com,Hamburg,MUG-01,1,34.70,gift
- Counts
- 1,250 orders in the JSON · 3,804 rows in the CSV · 0 records skipped
- Tip: order_total repeats on each item row. Use item.qty × item.price when you sum, or ask for a second CSV with one row per order.
How to do it with todo.is
- Copy the prompt and say what one row should be and how to treat lists.
- Attach the .json file in todo.is, or paste a small sample straight into the chat with your agent.
- Your agent shows the structure it found, flattens it and writes the CSV.
- Download the file. Ask for an Excel copy or a second CSV for a nested list if one table is not enough.
Tips for a better result
- Decide what one row means first. "One row per order" and "one row per item" give very different files.
- For deep data with several lists, ask for two linked CSVs (orders and items) joined by an ID. It is easier to analyze.
- JSON Lines files (.jsonl, one object per line) work too. Say so if the file is very large.
- Pulling the same API every day? Give your agent the URL and make it a recurring to-do that sends a fresh CSV.
JSON to CSV converter: FAQ
- How do you convert nested JSON to CSV? Nested objects are flattened into columns with dotted names like customer.address.city. Arrays are either expanded into extra rows, joined into one cell, or moved into a separate CSV.
- Can I convert a JSON API response to CSV? Yes. Paste the URL if it is public, or attach the saved response. Your agent fetches the JSON and converts it.
- What happens to fields that only some records have? They still get a column. Records that do not have the field get an empty cell.
- Is my data kept private? Your file stays in your own agent workspace and only your agent uses it.
JavaScript is required to use the todo.is app.