YAML to CSV Converter
Turn a YAML list of records into CSV rows you can open in a spreadsheet
YAML Input
CSV Output
Paste your YAML on the left and the CSV shows up here.
Or drop a file on this box, , or .
What is YAML to CSV Converter?
Spreadsheets cannot open YAML (YAML Ain't Markup Language), and most YAML people want in a spreadsheet is really a list of records: shipments, users, test cases. This page writes that list as CSV (Comma-Separated Values), one row per item and one column per key, updating while you type. Loading follows the YAML specification, so anchors, flow lists and quoted strings behave the way they would in your application.
The rows do not have to sit at the top level. A file shaped like shipments: [...] or data: {items: [...]} works too, because the converter digs down to the first list of mappings it finds. If the output says the YAML is invalid, the YAML Validator points at the exact line. Starting from JSON? Run it through JSON to YAML first.
Two quirks worth knowing before you import the result. Numbers are written the way JavaScript prints them, so weightKg: 2.40 comes out as 2.4; quote the value in the YAML if the trailing zero matters. Very long integers such as a 22-digit tracking number keep every digit, and dates like 2024-03-18 stay as typed. None of it leaves your browser.
How to Use the YAML to CSV Converter
Follow these steps to convert YAML to CSV.
Paste, Upload, or Load Sample
Paste the list into the left pane or open a YAML file with Upload; a file that fails to parse is rejected with a message. Sample gives you three subscribers as a top-level list. The shipment list below shows the trickier cases, a nested dest mapping and an inline tags list:
shipments:
- tracking: "1Z999AA10123456784"
carrier: UPS
weightKg: 2.40
shippedOn: 2024-03-18
dest:
city: Bergen
postcode: "5003"
tags: [fragile, signature]
- tracking: 9400111202555842760012
carrier: USPS
weightKg: 0.8
shippedOn: 2024-03-19
dest:
city: Tulsa
postcode: "74103" View CSV Output
The right panel shows the CSV. Each list item becomes a row and its keys become column headers. Nested mappings are flattened into dotted columns like address.city, and lists inside an item stay in one cell as JSON.
Download or Copy
Click Download to save as .csv, or Copy to clipboard. Open in Excel, Google Sheets, or import into databases. Use CSV to YAML to convert back. All processing runs in your browser.
When You'd Actually Use This
Data Analysis
A YAML inventory of 200 test handsets is hard to sort by firmware version. As CSV it opens in Excel or Google Sheets, where a filter and a pivot table answer the question in a minute.
Database Import
Import YAML data into databases that require CSV format. Many database tools accept CSV imports, making this conversion essential for data migration.
Spreadsheet Workflows
Work with YAML data in spreadsheet applications. Convert configs, settings, or data files to CSV for easier editing and manipulation in Excel or Google Sheets.
Reporting
Generate reports from YAML data. Convert YAML structures to CSV for creating charts, tables, or presentations in spreadsheet tools.
Common Questions
Is my YAML data stored?
No. The input is read inside the page and the CSV string is assembled right there, so the only copy of your data is the one in this tab. Download writes converted.csv straight from memory.
How are nested structures handled?
Nested mappings are flattened into dotted column names, so address: {city: Portland} becomes an address.city column. Lists inside a row stay in one cell as JSON text, like ["vip","newsletter"], because CSV has no way to nest them.
Can I convert CSV back to YAML?
Yep. Use our CSV to YAML converter to convert CSV files back to YAML format. The conversion works both ways.
What if my YAML has arrays?
The rows come from a top-level list, or, if the top level is a mapping, from the first list of mappings inside it (so subscribers: [...] works). Each item is one row. A list of plain values gives a single value column, and a lone mapping becomes one row.
Is the CSV Excel-compatible?
The CSV output follows standard CSV format and opens perfectly in Excel, Google Sheets, and other spreadsheet applications.
Does it work with large datasets?
There is no size cap, so your browser's memory sets the limit. A few thousand rows convert as you type without visible lag. For exports in the tens of megabytes, a command-line tool such as yq will be quicker than pasting into an editor.
Other YAML Tools You Might Need
CSV to YAML takes you back the other way. If the data should land in code rather than a spreadsheet, YAML to JSON or YAML to TypeScript fits better, and the formatter and validator help when the source itself is messy: