YAML to CSV Converter
Flatten YAML into a spreadsheet: each list item becomes a row, nested keys become dotted columns like address.city, and lists of values are joined into one cell.
YAML to CSV Converter
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Add your YAML
Paste it into the left box, press Open file, or drag a .yaml file onto it. Sample loads a realistic example.
Set the options
Adjust the options above the boxes — the output updates instantly as you change them.
Check the result
Read the status line: it reports rows, keys and any value that couldn't be represented in CSV.
Copy or download
Copy the CSV or download it as a .csv file. Nothing was uploaded at any point.
Several lists in one file? Use YAML to JSON, then JSON to Excel to get one sheet per list.
Features
Nested data flattened
Nested objects become dotted columns (address.city), and arrays of plain values are joined so every row fits the grid.
Any output delimiter
Comma for most tools, semicolon for European Excel, tab or pipe when your data is full of commas.
Opens cleanly in Excel
Add a UTF-8 byte-order mark so Excel on Windows shows accents, ₹, € and emoji correctly instead of mojibake.
Quoting control
Quote only the fields that need it (RFC 4180 minimal) or every field for strict importers.
Private by design
Parsing and conversion run in your browser with JavaScript — your data is never uploaded, logged or stored.
About the YAML to CSV Converter
YAML is great for humans writing configuration and data, but when you need to review, sort or share that data, a spreadsheet is easier. This converter finds the list in your YAML — the document itself if it's a list, or the first list inside a top-level map — and turns each entry into a row.
Nested maps are flattened into dotted column names, so address: {city: Pune} becomes an address.city column. Lists of plain values (tags: [a, b]) are joined with semicolons in one cell, and lists of maps are kept as JSON text so no data is dropped. The column set is the union of all entries, so keys that only appear on some entries still get a column, and the table preview shows exactly what you'll download.
The CSV follows RFC 4180 quoting. For Excel, choose semicolons if your regional settings use a decimal comma, and tick UTF-8 BOM so non-ASCII characters display properly when you double-click the file.
Examples
A host inventory in YAML: a list of servers with nested specs and a tag list.
hosts:
- name: web-1
ip: 10.0.0.11
spec: { cpu: 4, ram_gb: 8 }
tags: [web, public]
- name: web-2
ip: 10.0.0.12
spec: { cpu: 4, ram_gb: 8 }
tags: [web]
- name: db-1
ip: 10.0.1.5
spec: { cpu: 8, ram_gb: 32 }
tags: [db, private]
backup: dailyname,ip,spec.cpu,spec.ram_gb,tags,backup
web-1,10.0.0.11,4,8,web; public,
web-2,10.0.0.12,4,8,web,
db-1,10.0.1.5,8,32,db; private,dailyThis output was produced by the converter on this page with the default options — load it with the “Inventory” preset above and change any option to see the effect.
How YAML maps to CSV
| In YAML | Becomes in CSV |
|---|---|
| List item | one row |
name: Ada | column name |
Nested address: {city: Pune} | column address.city |
tags: [a, b] | cell a; b |
| List of maps inside an item | JSON text in one cell |
| Missing key on an item | empty cell |
~ / null | empty cell |
Things that trip people up
- Which list becomes the rows. If your YAML has several top-level lists, the first one is used. Convert one section at a time, or use YAML to JSON and JSON to Excel for one sheet per list.
- Untick flatten for raw objects. With Flatten nested keys off, nested maps are written as JSON text in a single column instead of dotted columns.
- Leading zeros in Excel. The CSV keeps
007, but Excel strips it when opening the file. Import via Data → From Text/CSV and set the column to Text. - Multi-line strings. Block scalars keep their line breaks inside a quoted CSV cell. Excel shows them as multi-line cells; some simpler tools may not.
YAML vs CSV at a glance
| Property | YAML | CSV |
|---|---|---|
| Specification | YAML 1.2.2 (2021) | RFC 4180 (2005) |
| File extension | .yaml / .yml | .csv |
| Media type | application/yaml (RFC 9512) | text/csv |
| Data types | string, int, float, bool, null, map, sequence (+ dates in many parsers) | text only — every cell is a string |
| Comments | Yes # | No |
| Nesting | Unlimited (indentation) | None (flat rows) |
- YAML: YAML 1.2 is a superset of JSON; YAML 1.1 parsers (still common) also read yes/no/on/off as booleans — the “Norway problem”.
- CSV: Fields containing a comma, a double quote or a line break must be wrapped in double quotes, and a quote inside is written twice ("").