YAML is the same data as JSON, written for people to read and edit. 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 YAML file on the way to becoming a CSV one.
What runs when a YAML file becomes CSV
Python and its standard library, on a machine we rent and watch. Your YAML file is uploaded once, Python runs once, the CSV comes back, and neither file is kept. YAML 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 YAML into the CSV
Every value, and the names you gave them. This pair reads your YAML 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 YAML 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 YAML and CSV files come from
YAML. Written in 2001 to be readable where JSON is merely parseable. It holds exactly the same shapes, so the conversion between the two loses nothing. It is what most tools reach for when a human will have to open the file: Kubernetes, GitHub Actions, Docker Compose.
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 YAML file, and structure is what a model needs. YAML in, CSV out, with the heading tree intact instead of flattened into one long paragraph.
YAML to CSV, measured rather than promised
Running YAML 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 YAML file on one day and not an average, which is why the number is given together with the file that produced it.
The YAML 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.
Other ways into CSV, and what they measured
Among the published routes into CSV, YAML is the fifth largest output of the 5 measured. The witness files differ, so this ranks the probe run and not your document.
XLSX to CSV: 89 bytes in 1.1 seconds.
JSON to CSV: 39 bytes in under a tenth of a second.
XLS to CSV: 89 bytes in 0.9 seconds.
ODS to CSV: 89 bytes in 1.1 seconds.
What we will not pretend about YAML to CSV
A YAML file over 25 MB is refused before the upload finishes rather than after it, so you do not wait for a rejection.
A YAML 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 YAML 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 YAML 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 YAML file at a time, chosen in the browser. There is nothing else to set up and nothing else on offer.
YAML to CSV: what people ask
What actually converts my YAML 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 YAML file is uploaded once, Python runs once, the CSV comes back, and neither file is kept afterwards.
How long does YAML 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 YAML file, not an average and not a promise about yours: a larger YAML takes longer, and past 50 seconds the run is stopped.
What do I lose going from YAML 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 YAML to CSV free?
There is a free allowance every month, and one YAML 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.