YAML to CSV Converter
Paste a YAML list of records and get a spreadsheet-ready CSV as you type. The header row is the union of every record's keys, so rows with different fields still line up, and any nested mapping or list is written into its cell as compact JSON. Pick the delimiter you need, then copy the CSV or download it as data.csv, all without your data leaving the browser.
How to convert YAML to CSV
- Paste your YAML list of records into the YAML input box, or click Load sample to see the shape.
- Check the CSV output box below, which updates live as you edit.
- Open the Delimiter menu and choose Comma, Semicolon, Tab or Pipe.
- Click Copy to grab the CSV, or Download to save it as data.csv.
Examples
A list of records with matching keys
- name: Ada role: Engineer age: 36 - name: Linus role: Maintainer age: 54
name,role,age Ada,Engineer,36 Linus,Maintainer,54
Records with different fields
- name: Ada age: 36 - name: Linus city: Portland
name,age,city Ada,36, Linus,,Portland
A single mapping becomes one row
name: Ada role: Engineer
name,role Ada,Engineer
Frequently asked questions
Is my YAML uploaded anywhere?
No. The conversion runs entirely in your browser with js-yaml and PapaParse, so your YAML never leaves your device and nothing is stored on a server.
What YAML shape works best?
A sequence of mappings, where each list item is a record with roughly the same keys. A single mapping also works and becomes one CSV row. A bare scalar like a lone number or string is rejected because it has no columns to build.
How are the CSV columns chosen?
The header is the union of keys across every record, in the order they first appear. Records that are missing a column get an empty cell, so heterogeneous data still aligns under the right headers.
What happens to nested objects and lists?
CSV cells hold flat text, so any nested mapping or array is written as compact JSON inside its cell, such as {"city":"Portland"}. Top-level scalars like strings, numbers and booleans stay as plain values.
Which delimiters can I use?
Comma, semicolon, tab or pipe, chosen from the Delimiter menu. Any field that contains the delimiter, a quote or a line break is wrapped in quotes automatically so the file stays valid.
Why does the output use \r\n line endings?
Rows are separated by a carriage return and line feed, the line ending the CSV standard recommends and that Excel expects. Most spreadsheet apps and parsers read it without any trouble.
What if a list item is not an object?
If a top-level array item is a scalar or a nested list, it is placed under a single value column so nothing is lost. Mixing objects and loose values in one list is allowed but usually means the source YAML needs tidying.
Why am I getting an error?
The input must be valid YAML that describes a list of objects or a single object. A syntax slip, wrong indentation, or a top-level value that is only a number or string will be rejected with a short message.
Can I convert the CSV back to YAML later?
Not with this tool, which only goes one way. To move in the other direction, or to reshape data, pair it with the related JSON and CSV converters listed below.
Learn more
- Turning Nested YAML Into Flat CSV Columns
Why CSV needs flat rows, how nested YAML becomes JSON in a cell, how the header union handles uneven records, and how to prepare data.
Related tools
YAML to JSON
Convert YAML to JSON online. Paste YAML and get clean, pretty-printed JSON with the indentation you choose. Runs entirely in your browser.
JSON to CSV
Convert JSON to CSV online. Paste an array of objects and get clean, spreadsheet-ready CSV with the right headers. Runs in your browser.
CSV to JSON
Convert CSV to JSON online. Turn spreadsheet rows into clean JSON objects or arrays, with smart number and boolean typing. Free tier plus API.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baker's Percentage Calculator
Turn a bread formula into grams with baker's percentages. Flour is 100 percent, enter water, salt and yeast percents to get weights and hydration.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.