araç köşesi

YAML to CSV

Turn a YAML list into a CSV table for Excel; nested fields become columns such as address.city

Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.

How it works

To see a list from a YAML file — products, users, servers, test fixtures — as a table in Excel, paste the YAML into the left pane and the CSV appears on the right. The tool finds the rows itself: if the YAML is a list, each entry is a row; if the list sits under a key such as "products:", the first list of objects is used and the result line says "rows taken from the products list". If there is no list at all, the whole mapping becomes one row. Each key is a column, and a key missing from an entry leaves an empty cell. A nested field becomes a dotted column (warehouse: {city: Denver} → warehouse.city), and a list goes into a single cell as JSON text (["kitchen","gift"]). The comma is the default here because English-language Excel expects it; a cell that contains the separator, like "Plate, porcelain", is put in quotes. The downloaded file starts with a UTF-8 BOM, without which Excel shows letters such as é or ñ as garbage. Values keep their YAML spelling: a ZIP code like 02134 does not lose its leading zero in the CSV, and 24.90 stays 24.90.

This tool is also known as yaml to csv, yaml to csv converter, convert yaml to csv, yml to csv, yaml to excel.

What is CSV?

CSV is a plain-text table in which each line is a record and cells are split by a separator; Excel, Google Sheets and databases all import it. With data coming from YAML, two CSV limits matter: it cannot hold nesting (hence dotted columns such as warehouse.city), and it has no types — every cell is text, and whether it is read as a number is up to the program that opens the file.

What is UTF-8 BOM?

The BOM (byte order mark) is an invisible three-byte signature at the start of a file (EF BB BF) that says the file is UTF-8. When Excel opens a CSV without it, it falls back to an older Windows encoding and letters such as é, ü or ñ turn into garbage. This tool adds a BOM to the downloaded file; the text you copy from the panel has none, because pasted text does not need it.

What is the difference between YAML and CSV?

YAML holds nested structure: a product's warehouse, the warehouse's city and the product's tag list all live inside one record, and records may have different fields. CSV is a flat table: every row has the same columns, nested data only fits as combined names like warehouse.city, and a list only as text in one cell. In YAML an unquoted number or true has a type; in CSV everything is text. Use CSV when people will filter or total the data in Excel, YAML when a program is being configured.

Which list becomes the rows, and how nested data is flattened

CSV is a flat table and YAML is nested, so the tool maps one to the other with fixed rules. A list at the top level gives one row per entry. A mapping at the top level is searched (shallow levels first, then deeper) for the first list whose entries are objects; that list becomes the rows, and its name is shown in the result line. Other keys on the same level, such as a "version:" next to the list, are not part of the table; convert them separately if you need them.

Flattening: a nested mapping becomes column names joined with a dot (warehouse.city, warehouse.shelf); a list is written into one cell as JSON text, because the number of columns it would need changes from entry to entry. An empty value (null or ~) becomes an empty cell. Columns appear in the order the keys are first seen.

  • warehouse: {city: Denver, shelf: A3} → warehouse.city and warehouse.shelf columns
  • tags: [kitchen, gift] → ["kitchen","gift"] in one cell
  • key missing from an entry → empty cell in that row
  • no list → the whole mapping is one row

Opening it correctly in Excel: separator, BOM and leading zeros

English-language Excel uses the comma as its list separator, so the comma is the default. Excel set to a European or Latin American region (where the comma is the decimal mark) expects semicolons and piles a comma file into a single column; choose the semicolon for those users. Choosing Tab downloads a .tsv file.

The tool carries values exactly as written: a ZIP code 02134, a price 24.90 or a date 2026-09-27 are the same in the CSV. Excel, however, interprets values when it opens a file and may drop the zero of 02134. If the zero matters, open the file through Data → From Text/CSV and mark that column as Text instead of double-clicking it.

Frequently asked questions

How do I convert YAML to an Excel file?

Paste the YAML into the left pane on this page; the CSV appears on the right. Download the .csv file with the Download button and open it in Excel. For English Excel keep the comma separator; the BOM in the downloaded file makes accented letters show correctly.

How does nested YAML look in the CSV?

A nested mapping opens into columns whose names are joined with a dot: city and shelf under warehouse become the warehouse.city and warehouse.shelf columns. A list goes into one cell as JSON text, for example ["kitchen","gift"]. That way each record stays on a single row.

What if the YAML has no list?

If the YAML only has "key: value" lines, the whole mapping becomes a one-row table: the keys form the header and the values the second line. The result line says so: "no list found, so the whole mapping became one row".

Is my data sent to a server?

No. Reading the YAML and writing the CSV happen entirely in your browser; a customer list or a price table never leaves this page. Once loaded, the page also works offline.