YAML to CSV
Paste a YAML list of records and get a downloadable-ready CSV table with a proper header row.
Example
Input YAML:
- name: Ada
age: 36
- name: Linus
age: 54
role: Engineer
Output CSV:
name,age,role
Ada,36,
Linus,54,Engineer
How it works
It parses your YAML with js-yaml, gathers the union of all object keys for the header, then writes each record as a CSV row with correct quoting and escaping. Conversion runs live as you type.
Good to know
YAML to CSV takes a YAML list of records (a sequence of mappings) and flattens it into a spreadsheet-ready CSV table, all without leaving your browser. It is aimed at developers, data engineers, and anyone who keeps structured data in YAML config or fixture files but needs it in a tabular format for Excel, Google Sheets, a database import, or a quick eyeball review. Because everything runs client-side via js-yaml, it works on sensitive data and even offline once the page has loaded.
Reach for it when you have YAML that is fundamentally row-shaped, such as a list of users, products, test cases, or API records, and a colleague or tool downstream only accepts CSV. It is also handy for diffing or sorting data that is awkward to scan in YAML, since one record per line in a flat table is far easier to compare.
Read the output by treating the first line as the header: it is the union of every key seen across all records, in first-seen order. If a record is missing a key that other records have, that cell is left empty so columns always stay aligned. Nested objects or arrays inside a value are collapsed into a compact JSON string within the cell, and any value containing a comma, quote, or newline is wrapped in double quotes with internal quotes doubled, following RFC 4180. The status line confirms how many records were converted, which is a quick sanity check against how many you expected.
A practical caveat: this tool expects a top-level list of objects (or a single object). If you feed it a scalar or a list of plain values, it falls back to a single-column "value" table rather than spreading data across columns, so structure your YAML as a sequence of mappings to get a true multi-column CSV. Also remember that flattening nested structures to JSON strings is lossy for spreadsheet workflows, so reshape deeply nested data before converting if you need each field in its own column.
Frequently asked questions
How are missing or extra keys handled?
The header is the union of every key across all records, in first-seen order. Records missing a key get an empty cell for that column, so rows always line up.
What happens to nested objects or arrays in a value?
Nested values are serialized to a compact JSON string inside the CSV cell, and any commas, quotes, or newlines are properly escaped per RFC 4180 quoting rules.
Is my data uploaded anywhere?
No — this tool runs entirely in your browser. Your input never leaves your device and it works offline once loaded.
Is it free?
Yes, completely free with no sign-up and no limits.
People also ask
Can I convert YAML with multiple documents separated by --- to CSV?
This tool loads a single YAML document, so a multi-document stream (separated by ---) will only parse the first document or error. Combine your records into one top-level list before converting.
Does the tool keep the original column order from my YAML?
Yes. Columns appear in first-seen order, meaning the order in which each key first appears as you read through the records from top to bottom, not alphabetical order.
What delimiter does the output use, and can I change it to a semicolon or tab?
The output uses a standard comma as the field separator. There is no option to switch delimiters, so for semicolon or tab-separated output you would need to replace the commas afterward or use a different converter.
How are boolean, null, and number values written in the CSV?
Values are written as their string form, so true/false and numbers appear without quotes, and a null or missing value becomes an empty cell. Only values containing commas, quotes, or line breaks get wrapped in double quotes.
Will the CSV open correctly in Excel or Google Sheets?
Generally yes, since the output follows RFC 4180 quoting rules that both applications understand. Copy or save the text as a .csv file and import it; multi-line values stay inside a single cell because newlines are preserved within quotes.
What is the difference between YAML to CSV and YAML to JSON or YAML to XML?
YAML to CSV produces a flat, tabular format best for spreadsheets and rows of similar records, while JSON and XML preserve nested hierarchy. Use CSV when your data is row-shaped, and JSON or XML when you need to keep nested structure intact.
Is there a size limit on how much YAML I can convert?
There is no enforced limit, but because parsing and conversion happen in your browser, very large inputs are bound by your device's memory and may feel slow. For typical config files and record lists this is not a concern.
Related tools