CSV is one table and nothing else, with no formulas and no cell formatting. YAML is the same data as JSON, written for people to read and edit. Python sits between the two, and this page says exactly what happens to a CSV file on the way to becoming a YAML one.
What runs when a CSV file becomes YAML
Python and its standard library, on a machine we rent and watch. Your CSV file is uploaded once, Python runs once, the YAML comes back, and neither file is kept. CSV to YAML 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 CSV into the YAML
Every value, and the names you gave them. This pair reads your CSV into memory and writes it back out as YAML: 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.
Each row becomes an object, with your header row as its keys. A CSV of two hundred rows arrives as a list of two hundred objects, which is what a program expects to iterate over.
Column order, as the order of the keys. It carries no meaning in YAML and it is kept anyway, because a file you can read next to the original is worth more than a file you cannot.
What CSV to YAML costs you
Nothing, and it is worth saying plainly rather than inventing a caveat. A CSV holds rows of values and a YAML holds all of that and more. What changes is what you can now do with it.
One caveat that is not a loss but does surprise people: everything arrives as a string. A CSV says nothing about what its values mean, so 49 becomes "49" and not 49. Guessing would be worse: a product code of 007 would lose its zeros.
Where CSV and YAML 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.
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.
If a model is going to read the YAML
Structure is what survives from the CSV file, and structure is what a model needs. CSV in, YAML out, with the heading tree intact instead of flattened into one long paragraph.
CSV to YAML, measured rather than promised
Running CSV to YAML against the real engine with a real file, Python wrote 68 bytes of YAML in under a tenth of a second, machine otherwise idle. That is one CSV file on one day and not an average, which is why the number is given together with the file that produced it.
The CSV to YAML 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 YAML file has anything inside it.
The same CSV file, sent somewhere else
Other outputs the probe measured out of a CSV file, so the cost of choosing YAML can be read against something. Sizes do not compare across engines, because each family was probed with its own CSV witness file.
CSV to PDF: 12,680 bytes in 1.0 seconds, verified by a format signature.
CSV to MD: 114 bytes in 0.1 seconds, verified by a pandoc round trip.
CSV to DOCX: 9,945 bytes in 0.1 seconds, verified by a pandoc round trip.
CSV to EPUB: 4,913 bytes in 0.1 seconds, verified by a pandoc round trip.
CSV to TXT: 114 bytes in under a tenth of a second, verified by reading the text back.
CSV to HTML: 3,894 bytes in 0.1 seconds, verified by a pandoc round trip.
Other ways into YAML, and what they measured
Among the published routes into YAML, CSV is the second largest output of the 2 measured. The witness files differ, so this ranks the probe run and not your document.
JSON to YAML: 68 bytes in under a tenth of a second.
What we will not pretend about CSV to YAML
A CSV file over 25 MB is refused before the upload finishes rather than after it, so you do not wait for a rejection.
A CSV to YAML 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 CSV whose shape does not suit YAML 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.
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 CSV file at a time, chosen in the browser. There is nothing else to set up and nothing else on offer.
CSV to YAML: what people ask
What actually converts my CSV file to YAML?
Python does it, and its standard library, on a machine we rent and watch. Not a browser trick and not somebody else service: the CSV file is uploaded once, Python runs once, the YAML comes back, and neither file is kept afterwards.
How long does CSV to YAML take?
On the file the probe used, Python took under a tenth of a second and wrote 68 bytes of YAML. That is one real measurement on one real CSV file, not an average and not a promise about yours: a larger CSV takes longer, and past 50 seconds the run is stopped.
What do I lose going from CSV to YAML?
The one to know about first: Nothing, and it is worth saying plainly rather than inventing a caveat. A CSV holds rows of values and a YAML holds all of that and more. What changes is what you can now do with it.
Why is 49 quoted as "49" in the YAML?
Because a CSV says nothing about what its values mean, so everything arrives as text. Guessing would be worse than this: a product code of 007 would lose its zeros, and a date of 03/04 would become ambiguous. Converting the columns you know about is a step you keep control of.
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 CSV to YAML free?
There is a free allowance every month, and one CSV to YAML 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 YAML.