YAML to CSV

Turn YAML lists into CSV rows.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

YAML to CSV Converter Online

The YAML to CSV converter flattens a list of YAML records into a comma-separated table that opens in Excel, Google Sheets, LibreOffice, or any database import wizard. It is ideal for turning inventory files, Ansible host vars, test fixtures, or exported YAML datasets into something a non-developer can sort and filter.

Finding the records

YAML files rarely start with a bare list. More often the records sit under a key, next to a few metadata fields:

team: Platform
members:
- name: Jane Doe
role: Tech Lead

The converter locates that repeating list automatically, so you don't have to cut the metadata away first. Each list item becomes one CSV row, and the union of all keys becomes the header — records with missing keys get empty cells, and keys that only appear in later items still get their own column.

Flattening rules

  • Nested mappings are turned into dotted columns: address: {city: Izmir} → address.city.
  • Lists of scalars become one cell, joined with commas.
  • Booleans and numbers are written as text (true, 42), and null becomes an empty field.

Delimiter and quoting

Choose comma, semicolon, tab, or pipe. Fields that contain the delimiter, a double quote, or a line break are wrapped in quotes and inner quotes are doubled, exactly as RFC 4180 requires. Turn on Quote every field if the importing system expects every value in quotes. Switch off the header row when appending to an existing file.

A preview table under the editor shows the rows and columns before you copy or download the .csv file.

Need a spreadsheet file? Use YAML to Excel. For other targets, see the YAML Converter; for JSON sources use JSON to CSV. To read the CSV back, open it in the CSV Viewer.

Frequently Asked Questions

If the document is a list, each list item is a row. Otherwise the converter searches the document for the list of records — like members: in the sample — and uses that. Scalar values next to the list (team, updated) are not rows, so they are left out.

Nested mappings are flattened into columns with dotted names such as address.city, and lists of plain values like skills: [go, redis] are joined into one cell (“go, redis”). Items that lack a key simply get an empty cell in that column.

Yes. Choose the semicolon delimiter if your Excel uses a comma as decimal separator (common in Europe). For a native workbook without any import dialog, use YAML to Excel instead.