CSV to JSON converter with real types and the shape your code expects
Most quick converters turn every CSV value into a string, so "42" and "true" arrive as text and break your code. Your todo.is agent converts the CSV to JSON with proper numbers, booleans and nulls, nests grouped columns, and validates the result before sending it.
The prompt
- Convert the attached CSV to JSON: [ATTACH THE CSV]. Output [JSON SHAPE]. Use these keys: [KEY STYLE]. Make numbers numbers, "true/false" and "yes/no" booleans, and empty cells null. Turn columns with dots in the name (like address.city) into nested objects. Group rows by [GROUP BY] if set. Pretty-print with 2 spaces, UTF-8. Validate the JSON and give me the .json file plus a short note on any values you could not type.
What to change
- [ATTACH THE CSV]: Attach a .csv or .tsv file, or paste the rows.
- [JSON SHAPE]: E.g. "an array of objects", "an object keyed by id" or "JSON Lines, one object per line".
- [KEY STYLE]: E.g. "camelCase", "snake_case" or "the header names as they are".
- [GROUP BY]: E.g. "category", "order_id with items as an array" or "none".
Example result
- CSV to JSON: products.csv
- 640 rows · 9 columns · output: object grouped by category, camelCase keys
- Type rules applied
- • id, stock: integers
- • price: number (19.9, not "19.90")
- • in_stock: "yes"/"no" became true/false
- • launch_date: kept as an ISO string "2026-04-15"
- • dimensions.w, dimensions.h: became a nested "dimensions" object
- • Empty cells became null
- Sample output
- {
- "Lighting": [
- {
- "id": 1042,
- "name": "Arc Floor Lamp",
- "price": 149.0,
- "inStock": true,
- "stock": 18,
- "launchDate": "2026-04-15",
- "dimensions": { "w": 40, "h": 180 },
- "colour": null
- }
- ],
- "Textiles": [ ... ]
- }
- Checks
- • Valid JSON (parsed without errors)
- • 640 rows in, 640 objects out across 7 categories
- • Product codes like "0071" were kept as strings because they have a leading zero
- • 2 prices were "TBC". They are null and listed below so you can fill them in: ids 1180, 1203
- Notes
- Keys were converted from "In Stock" to "inStock" and from "Launch Date" to "launchDate". Ask for snake_case or the original headers if your code expects those.
How to do it with todo.is
- Copy the prompt and choose the JSON shape and key style your code uses.
- Paste it into todo.is with the CSV attached, or send both to your agent on Slack or Telegram.
- Your agent types every value, builds the structure and validates the file.
- Download the .json. Ask for a JSON Schema or a TypeScript type for it in the same chat if you need one.
Tips for a better result
- Share a small example of the JSON you want. Your agent will match that shape exactly.
- IDs and codes with leading zeros should stay strings. Mention them if the CSV mixes both.
- For seed data or config files, ask for "an object keyed by id". Lookups in code are simpler.
- Need it as part of a pipeline? Ask your agent for a small Python or Node script that does the same conversion, tested on your file.
CSV to JSON converter: FAQ
- Can CSV to JSON keep numbers as numbers? Yes. Your agent detects numeric, boolean and empty values and writes them as JSON numbers, true/false and null instead of strings.
- How do I make nested JSON from a flat CSV? Use dotted headers like address.city, or ask to group rows by a column. Your agent builds the nested objects or arrays from that.
- What is JSON Lines? It is one JSON object per line instead of one big array. It is easier to stream and append, and many data tools and APIs accept it.
- Can it handle a very large CSV? Files up to 50 MB can be attached. For big files, JSON Lines output keeps the result easy to process.
JavaScript is required to use the todo.is app.