JSON is a data tree of objects, lists, numbers and strings. CSV is one table and nothing else, with no formulas and no cell formatting. Python sits between the two, and this page says exactly what happens to a JSON file on the way to becoming a CSV one.
What runs when a JSON file becomes CSV
Python and its standard library, on a machine we rent and watch. Your JSON file is uploaded once, Python runs once, the CSV comes back, and neither file is kept. JSON to CSV is one of the 3649 pairs that engine was probed on with a real file, which is why it has a page here and why the pairs the probe could not prove do not.
What survives from the JSON into the CSV
Every value, and the names you gave them. This pair reads your JSON into memory and writes it back out as CSV: no field is renamed, reordered into something else or quietly dropped. The engine reads its own output back and counts the elements, and refuses the result if the count moved.
Every field of every record, as a column. The header row is built from the keys, and a record missing a key gets an empty cell rather than a shifted row.
The values as they are. Numbers are not reformatted, strings are not trimmed, and nothing is coerced: what goes in comes out.
What JSON to CSV costs you
Any nesting. A table cell holds one value, so a record whose field holds an object or a list has nowhere to put it. This conversion is refused rather than guessed at: flattening would mean inventing a naming convention you did not choose, and a file built on an invented convention is a trap for whoever reads it next.
Types. A CSV has no notion of number, boolean or null: everything becomes text, and whoever reads it decides what it means. That is the price of a format anything can open.
Where JSON and CSV files come from
CSV. Everything writes it and nothing agrees on it. There is an RFC, 4180, and it describes common practice rather than commanding it: quoting, escaping and line endings all vary by producer. A CSV is the lowest common denominator, which is both why it is everywhere and why it surprises people.
If a model is going to read the CSV
Structure is what survives from the JSON file, and structure is what a model needs. JSON in, CSV out, with the heading tree intact instead of flattened into one long paragraph.
JSON to CSV, measured rather than promised
Running JSON to CSV against the real engine with a real file, Python wrote 39 bytes of CSV in under a tenth of a second, machine otherwise idle. That is one JSON file on one day and not an average, which is why the number is given together with the file that produced it.
The JSON to CSV verdict was reached by parsing the data back and finding a witness word, meaning the output was read back and recognised. Which check was used matters, because they do not all prove the same thing, and a status code of 200 proves nothing whatsoever about whether the CSV file has anything inside it.
The same JSON file, sent somewhere else
Other outputs the probe measured out of a JSON file, so the cost of choosing CSV can be read against something. Sizes do not compare across engines, because each family was probed with its own JSON witness file.
JSON to MD: 266 bytes in under a tenth of a second, verified by a pandoc round trip.
JSON to DOCX: 10,106 bytes in 0.1 seconds, verified by a pandoc round trip.
JSON to EPUB: 5,035 bytes in 0.1 seconds, verified by a pandoc round trip.
JSON to TXT: 264 bytes in under a tenth of a second, verified by reading the text back.
JSON to HTML: 4,018 bytes in 0.1 seconds, verified by a pandoc round trip.
JSON to RTF: 687 bytes in 0.1 seconds, verified by a pandoc round trip.
Other ways into CSV, and what they measured
Among the published routes into CSV, JSON is the fourth largest output of the 5 measured. The witness files differ, so this ranks the probe run and not your document.
XLS to CSV: 89 bytes in 0.9 seconds.
ODS to CSV: 89 bytes in 1.1 seconds.
YAML to CSV: 39 bytes in under a tenth of a second.
XLSX to CSV: 89 bytes in 1.1 seconds.
What we will not pretend about JSON to CSV
A JSON file over 25 MB is refused before the upload finishes rather than after it, so you do not wait for a rejection.
A JSON to CSV run that passes 50 seconds is killed, and the Python process is killed with it. A run left behind would sit on one of the machine's two cores until somebody noticed.
Whether this pair works depends on your data and not only on the two formats. A JSON whose shape does not suit CSV is refused with 422 and a message naming what is missing, which is different from "this format is not supported" and is said differently on purpose. The refusal is immediate and costs nothing.
Note on the word JSON, because it means two things here. Converting Markdown or a Word file to JSON gives pandoc's syntax tree, which describes the document. Converting a JSON gives your data. Both are JSON and they are not the same thing; the site picks by source, which is the only way to tell them apart.
XML is not in this family, and it is the obvious absence. It has no evident mapping to this model: attributes against elements, mixed text, significant order. Every conversion would mean inventing a convention, and an invented convention is a trap for whoever reads the file next. The family stays with what translates without arbitrary choices.
One JSON file at a time, chosen in the browser. There is nothing else to set up and nothing else on offer.
JSON to CSV: what people ask
What actually converts my JSON file to CSV?
Python does it, and its standard library, on a machine we rent and watch. Not a browser trick and not somebody else service: the JSON file is uploaded once, Python runs once, the CSV comes back, and neither file is kept afterwards.
How long does JSON to CSV take?
On the file the probe used, Python took under a tenth of a second and wrote 39 bytes of CSV. That is one real measurement on one real JSON file, not an average and not a promise about yours: a larger JSON takes longer, and past 50 seconds the run is stopped.
What do I lose going from JSON to CSV?
The one to know about first: Any nesting. A table cell holds one value, so a record whose field holds an object or a list has nowhere to put it. This conversion is refused rather than guessed at: flattening would mean inventing a naming convention you did not choose, and a file built on an invented convention is a trap for whoever reads it next.
Why was my file refused?
Almost always because a field holds an object or a list, and a table cell holds one value. The answer names the field and the row. Flattening it would mean inventing a naming convention you did not choose, so the tool refuses rather than guesses.
What happens to a record that is missing a field?
It gets an empty cell in that column. The header is built from every key seen across every record, so no row is ever shifted out of alignment by a missing field.
Is my data sent anywhere else?
No. It goes to one machine we rent and watch, is read by Python and written back out, and neither file is kept. There is no third-party service in this family and no model reading your data.
Is JSON to CSV free?
There is a free allowance every month, and one JSON to CSV conversion costs half a credit against it. When the allowance runs out the tool says so and stops, rather than quietly handing you a worse CSV.