JSON to CSV
For getting an API response into a spreadsheet.
Everything is processed in this tab. Nothing you paste is sent anywhere.
Every tool runs entirely in your browser. Your files are never uploaded to a server.
Each object becomes a row and each key a column. Nested objects flatten to dotted names like team.name, and any value containing a comma, quote or newline is wrapped in quotes.
How to use JSON to CSV Converter
- Paste a JSON array. An array of objects is the usual shape from an API.
- Choose a separator. Semicolon if your Excel is set to a European locale.
- Copy or save the CSV. Add the byte order mark if Excel is mangling accents.
About converting JSON to CSV
Converting JSON to CSV is a conversion between two data models that do not match, and every decision in it is about what to do with the mismatch. JSON is a tree with arbitrary nesting and optional keys; CSV is a flat rectangle where every row has the same columns in the same order. Something has to give. Nesting is handled by flattening to dotted column names, which is lossless for objects and reversible if anyone needs to go back. Arrays are the harder case, because a variable-length list cannot become a fixed number of columns without either padding to the longest or losing data. Writing them as JSON text in a single cell is the least bad option: a spreadsheet shows something meaningful, and nothing is destroyed. Differing keys between records is where naive converters quietly lose data. Taking the columns from the first object is fast and wrong the moment the second object has a field the first did not — a shape that is completely normal in API responses, where optional fields simply do not appear. Collecting the union of keys across all rows costs one extra pass and prevents silent loss. Quoting is the part with a specification behind it. RFC 4180 requires a value to be quoted when it contains the separator, a double quote or a line break, and an embedded quote is escaped by doubling. Getting this wrong is not subtle: a single comma inside a name shifts every column after it for that row, and the resulting file often still opens without complaint.
Frequently asked questions
What happens to nested objects?
What if my objects have different keys?
Why do some values have quotes around them?
Why would I add a byte order mark?
Should I use a semicolon instead of a comma?
Last updated