YAML to CSV Converter
YAML to CSV Converter flattens one row collection on this page. Nested maps become column paths.
About this tool
Each record becomes one row. Nested maps use dotted column paths, and a list uses indexes such as tags[1]. A map of records keeps the map key in a key column. Include header row writes those names first. The serialized CSV is the file you copy, download, or continue with.
How to use it
- Paste YAML. A list, a nested list, a map of records, or one mapping can become the table.
- If several row collections are equally valid, choose Rows from. Then set the output delimiter and header.
- Use Convert. Copy, download, or continue with the serialized CSV.
Limitations
- CSV holds one table. When more than one row collection ties, choose the path in Rows from. Unrelated tables are not merged.
A loaded document flattened to a grid
Indentation is structure until the loader runs, then it is columns
One YAML document is loaded. Tabs used as indentation fail. Comments disappear. Anchors are resolved, so the anchor name is not a column and the aliased mapping is copied into the rows that used it. The flattener then searches for a list of mappings or a map of mappings. You may have to choose the row source when two collections are the same size. Nested mappings become dotted headers. Lists of scalars become numbered columns starting at one. A document that is only a list of scalars has no records and fails.
Types change on the way into the cell. Null becomes an empty cell, so a null and a missing key look alike in the CSV. A timestamp the loader turns into a date is written with an ISO instant spelling, not with the characters from the YAML line. A zero-padded number can already be a number before it is placed in the cell, and the cell shows that number’s ordinary digits. Booleans become text. The grid does not store the original YAML tag.
Destination dialect
The output separator, quote, escape, and header switch are independent of the YAML. The header row lists the flattened paths when the switch is on. Without it, the names exist only in the preview’s memory of this run, not in the file. A spaces separator is written as a comma. Quoting follows the cell contents and the chosen separator. The preview can clip. The copied CSV is complete.
What you cannot flatten faithfully
A graph that needed anchors to avoid duplication will duplicate text in the cells. A multiline block scalar becomes one cell, and a line break inside it will force quoting. Two lists that both look like the table require an explicit path, and the list you did not choose is not appended as extra columns. Use this page to project records. Keep the YAML if dates, nulls, or comments have to stay in their original form.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

