YAML to CSV — Convert YAML Data to CSV Spreadsheet in Your Browser
Convert YAML data to CSV spreadsheet. Supports nested structures, configurable delimiter, and array-of-arrays output. Runs entirely client-side.
YAML is the configuration language the industry chose for its readability, and CSV is the data format the industry chose for its ubiquity. A YAML file defines infrastructure (Kubernetes manifests, Ansible playbooks), application settings (Spring Boot config, Rails database.yml), and pipeline definitions (GitHub Actions, GitLab CI). A CSV file is what you get when you ask the systems that run on that YAML to produce a report. The conversion from YAML to CSV is the bridge between the configuration and the report: a list of services becomes a spreadsheet of service metadata, a CI pipeline definition becomes a table of job names and their triggers, a set of feature flags becomes a compliance audit spreadsheet.
The conversion is structurally straightforward — YAML’s array-of-objects maps directly to CSV’s header-plus-rows pattern — but the edge cases are in YAML’s features that CSV cannot represent. Anchors and aliases let YAML authors avoid repetition, and the converter resolves them before flattening. Tags like !!int and !!bool let YAML carry typed values, and the converter stringifies them into CSV cells. Nested objects like spec.containers[0].image become dot-notation column names, which is readable in a header row but verbose when the nesting is deep. Each of those edge cases is handled with a sensible default, and the output is always a valid CSV that any spreadsheet application can open.
For a final hand-off: if the CSV output is going into a business intelligence tool (Tableau, Power BI, Looker), check that the dot-notation column headers are compatible with the tool’s naming rules (some BI tools reject dots in column names). If the YAML source has arrays of non-uniform objects (each object has different keys), the CSV will have as many columns as the union of all keys — use the JSON-to-CSV tool for non-uniform data where JSON is the better intermediate format. If the destination is a database import, most databases have a direct YAML importer for structured data, and converting to CSV as an intermediate step may be unnecessary.
How to use
Paste your YAML data
Drop a YAML string or file into the input. The parser reads YAML 1.2 — arrays of objects, arrays of arrays, and nested mappings. The top-level array is treated as the row source by default.
Select the row source
If the YAML has a top-level mapping wrapping an array (e.g. `items: [...]`), pick the array key from the dropdown. The keys of each object in the array become CSV column headers.
Copy or download the CSV
Default delimiter is comma. Switch to semicolon, tab, or pipe for specific import targets. Download as a .csv file with UTF-8 BOM, or copy to clipboard for spreadsheet paste.
Frequently asked
Can YAML anchors and aliases be converted to CSV?
Yes. YAML anchors (`&name`) and aliases (`*name`) are resolved during parsing, and the expanded data is converted to CSV. Merge keys (`<<:`) are also resolved before the conversion produces the flat table output.
What happens to nested YAML objects during CSV conversion?
Nested objects are flattened into dot-notation column names. A YAML field like `address.city` becomes a CSV column `address.city` with the string value. Deeply nested structures produce many columns — flattening to a manageable width may require a pre-processing step.
How are YAML arrays within objects handled?
Arrays of scalars within objects are joined into a single cell with a comma separator by default. An array of `[red, green, blue]` becomes the string 'red, green, blue'. Switch the join character in settings if comma conflicts with your CSV delimiter.
Does the converter preserve the order of YAML keys?
Yes. YAML mappings preserve key order, and the CSV columns follow the key order of the first object in the source array. If later objects have additional keys, new columns are appended to the right.
Limitations
- No YAML tags or custom type handlingYAML tags (like `!!timestamp`, `!!binary`) are decoded to their string representation but not converted to typed values. The CSV output is all strings — apply type formatting in your spreadsheet application.
- Deep nesting widens the CSVA YAML structure 5 levels deep can produce dozens of dot-notation columns. Spreadsheets handle 256-column limits on older Excel or 16,384 columns on modern versions — trim the source YAML if the output exceeds the target's column limit.
- Scalar YAML files produce single-cell CSVsIf the input YAML is a scalar (a single string, number, or boolean), the output CSV is a single cell with that value. The converter expects structured data and does not produce meaningful output for scalar YAML.
Platform notes
- macOS
- Numbers and Excel for Mac import CSV natively. The browser tool is the right pick for converting YAML configuration data to a spreadsheet for non-technical stakeholders to review.
- Linux
- CLI equivalent: `yq -o csv input.yaml` handles the conversion for simple YAML. The browser tool adds the path selector, delimiter options, and BOM output that yq's CSV output lacks.
- Web
- All YAML parsing and CSV generation runs client-side. No data is uploaded to any server. Works offline once loaded.