YAML to CSV
This converter turns a YAML sequence of mappings into RFC 4180 CSV in your browser. Nested values are flattened to column paths, fields are quoted only when needed, and rows end in CRLF — the exact file a spreadsheet expects. Nothing is uploaded.
La interfaz de esta herramienta está en inglés.
La guía de abajo solo está disponible en inglés.
YAML to CSV explained
YAML loves nesting; spreadsheets love flat rows. Between the two sits one mechanical question: how do the keys of a nested mapping become the headers of a table? This converter answers it the way the rest of the ecosystem does — with column paths. A record whose address object contains a city field produces an address.city column, so no information is dropped and no key collides.
The CSV side is strict RFC 4180: a comma delimiter, double-quote escaping when a field contains a comma, quote or newline, and CRLF row endings. Fields are quoted only when they must be, because every gratuitous quote is one more thing a downstream script has to be robust to. The result opens directly in Excel, Numbers, LibreOffice and Google Sheets.
Everything runs in this browser tab. The YAML text you paste is parsed by an in-page engine, the CSV is built from the parsed records, and neither ever touches a network — open DevTools, watch the Network panel stay silent, and the claim checks itself.
Going the other way — turning a spreadsheet export back into config — is the same engine in reverse, and the convert CSV back to YAML page handles it with the column-path convention read backwards.
If your source data is JSON rather than YAML, the dedicated JSON to CSV converter covers it with the same flattening rules.
How the conversion actually works
The engine parses your YAML into records first, because YAML files that tabulate well are sequences of mappings — a top-level list whose every item has keys. Each record's nested values are flattened to dot-separated column paths, the union of those paths across all records becomes the header row, and each record fills the columns it has, leaving blanks where it does not.
- Parse: the YAML text is read as a sequence of mappings. A file whose top level is a single mapping gets a clear error asking for a list.
- Flatten: nested mappings and arrays become column paths — address.city, tags.0, tags.1.
- Union: the header row is the ordered union of every record's paths, first-seen first, so the columns read in a stable, predictable order.
- Emit: each record is written as one CRLF-terminated row, fields quoted per RFC 4180 only when the content forces it.
What the output looks like
The worked example below is the exact pair the converter's Load sample button produces: two people records, one with a nested address and an array of tags. Watch what happens to each shape — the address object grows two columns, the tags array enumerates by index, and the comma inside a note field triggers quoting on exactly that one field.
Edge cases this converter refuses rather than mangles
An honest converter has edges, and the worst thing it can do is pretend it does not. Three inputs are rejected with a specific message instead of being silently reshaped, because each one means the output would lie to you:
- A top-level mapping instead of a sequence — a single config object is not a table, and inventing a one-row table would hide the mistake.
- Sequence items that are scalars or arrays — a list of strings cannot tabulate into named columns.
- Homogeneous keys that differ wildly between records — the union still converts, but the preview shows you the ragged result so you can decide before saving.
Frequently asked questions
Does converting YAML to CSV upload my file anywhere?
No. Parsing and CSV generation both run inside this browser tab with JavaScript that was loaded once when the page opened. The page has no API route to send data to, and the Content-Security-Policy forbids the page from connecting anywhere else. You can verify both claims in DevTools: the Network panel shows no request when you convert.
How are nested YAML values handled in the CSV output?
Nested mappings flatten to dot-separated column paths — an address object with a city field becomes an address.city column. Arrays flatten to indexed paths such as tags.0 and tags.1. No data is discarded: every leaf value in the YAML ends up in exactly one cell.
Which YAML syntax does the parser accept?
The everyday core: sequences and mappings, plain and quoted scalars, comments, booleans, integers, floats, null, and block scalars. Directives, anchors and aliases, and merge keys are outside the converter's supported set and are rejected with a named error rather than guessed at — the site documents exactly this subset so a failure is never a surprise.
Why do my rows end with CRLF, and can I change it?
RFC 4180 specifies CRLF (\r\n) as the row terminator, and that is what the converter emits by default because it is what maximally compatible spreadsheet software expects. Tools that want bare LF usually accept CRLF anyway; if your pipeline is strict about it, convert first and run the output through a newline-normalising step afterwards.
Is there a file size or row limit?
The limit is the browser tab's memory, not an upload cap. The engine parses on the main thread and refuses documents above 8 MB with a clear message rather than freezing the page — the same documented limit every other main-thread tool on this site applies. For typical config exports that is tens of thousands of rows.
How do I open the CSV in Excel with the right encoding?
The download is UTF-8 without a byte-order mark. Modern Excel handles that correctly via Data → From Text/CSV; older versions sometimes assume a legacy code page and mangle non-ASCII characters. If you see mojibake, use Excel's import dialog, pick UTF-8 as the source, and the data lands correctly.
Which related tools should I use next?
- CSV to YAMLConverter — runs in your browserOpen
- JSON to CSVConvert records to a spreadsheet grid, nesting and all.Open
- JSON FormatterIndent, sort keys and strip comments with configurable output.Open
- TOML to JSONConverter — runs in your browserOpen
- JSON ValidatorValidate syntax with exact line and column, and repair it in one click.Open
- CSV to JSONParse a spreadsheet export into records, quoting and all.Open