Orpheus

JSON to CSV

For getting an API response into a spreadsheet.

Options
Separator
Flatten nested objects into dotted columns
Add a byte order mark for Excel
Result

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

  1. Paste a JSON array. An array of objects is the usual shape from an API.
  2. Choose a separator. Semicolon if your Excel is set to a European locale.
  3. 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?
They flatten into dotted column names, so a team object with a name becomes a team.name column. Arrays are written as JSON text in a single cell, because there is no faithful way to spread a variable-length list across fixed columns.
What if my objects have different keys?
Every key from every object becomes a column, in the order first seen, and missing values are left empty. Using only the first object's keys is the common shortcut and it silently drops data whenever records differ — which real API output does constantly.
Why do some values have quotes around them?
Because RFC 4180 requires it whenever a value contains the separator, a double quote or a line break. A quote inside a quoted value is escaped by doubling it. Without this, one comma inside a name shifts every column after it.
Why would I add a byte order mark?
Because Excel on Windows reads CSV in the system codepage rather than UTF-8 unless the file starts with one. If accented names arrive mangled in Excel, the BOM fixes it. Most other tools do not need it and some show it as stray characters.
Should I use a semicolon instead of a comma?
If your Excel is set to a locale that uses a comma as the decimal separator — much of Europe — then yes, because it expects semicolons and will otherwise put every row into one cell. The file is still called CSV.

Last updated