Home › Developer Tools › YAML to CSV Converter

YAML to CSV Converter

Paste YAML or open a .yaml file and get a CSV table in one step. The converter finds the list of records, flattens nested keys into columns such as contact.email, and lets you choose, drop and reorder columns before you download.

Last updated:

Your YAML is parsed in your browser and never uploaded. Tip: Ctrl + Enter converts.

Advertisement
Advertisement

How to use the YAML to CSV Converter

  1. Paste your YAML into the left box or open a .yaml / .yml file. A sample team roster loads to start.
  2. Check where the rows come from. Auto-detect picks the largest list of records; choose another list or mapping if needed.
  3. Set flattening options: the separator for nested key names and how lists inside a record are written.
  4. Arrange the columns: untick the ones you do not need and use the arrows to change their order.
  5. Download .csv or copy the CSV. Tick Excel-friendly if you will open the file in Excel.

Example: from YAML records to a CSV table

This YAML has a list of two people, each with a nested mapping and a list:

members:
  - name: Ada Morgan
    contact:
      email: [email protected]
    skills: [go, terraform]
  - name: Ben Ortiz
    contact:
      email: [email protected]
      phone: "+1 555 0102"
    skills: [python]

With the default options it becomes:

namecontact.emailskillscontact.phone
Ada Morgan[email protected]go; terraform
Ben Ortiz[email protected]python+1 555 0102

Columns appear in the order they are first seen. A key that only some records have (here contact.phone) still gets a column, and records without it get an empty cell. Use the column list to move it next to contact.email.

Flattening rules at a glance

YAML valueCSV result
Scalar: role: SREColumn role
Nested mapping: address: {city: Austin}Column address.city (or address_city, address/city)
List of scalars: tags: [a, b]a; b, or tags.0 and tags.1, or ["a","b"]
List of mappings: jobs: [{name: x}]JSON text in one cell, or indexed columns such as jobs.0.name
Empty list or mappingEmpty cell
Multi-line block (| or >)One quoted cell; line breaks are kept inside the quotes
Date: 2026-03-142026-03-14 (ISO 8601)
Anchors and aliases (&base, *base, <<)Resolved to their values before flattening

Tips

  • Quoting: cells that contain the delimiter, a double quote or a line break are wrapped in double quotes, and inner quotes are doubled, as described in RFC 4180. Most spreadsheet and database importers expect exactly this.
  • Leading zeros: YAML reads zip: 02134 as the number 2134 under some parsers and as text under others. Quote such values in the YAML ("02134") to keep the zeros.
  • Kubernetes and Compose files: these are deeply nested configs rather than tables. Pick a specific list, such as spec.template.spec.containers, to get one row per container.
  • Going the other way? Use the CSV to YAML Converter, or convert to JSON with the YAML to JSON Converter.

Frequently asked questions

What YAML structure converts best to CSV?

A list of mappings, where each item has the same kind of keys, for example a list of users with name, email and role. Each item becomes one row and each key one column. The list can be the whole document or sit under a key such as members:, and the converter finds it automatically.

How are nested keys turned into columns?

Nested mappings are flattened with dot notation: contact: {email: [email protected]} becomes a column named contact.email. You can switch the separator to an underscore (contact_email) or a slash (contact/email) if the dot clashes with your tooling.

What happens to lists inside a record?

By default a list of simple values is joined in one cell with a semicolon, so skills: [go, sql] becomes go; sql. Indexed columns give each value its own column (skills.0, skills.1), and JSON text keeps the exact structure, which is handy for lists of objects.

Can I convert a mapping of records instead of a list?

Yes. If the YAML looks like users: {alice: {...}, bob: {...}}, pick that mapping in the Rows come from list. Each entry becomes a row and its name goes into a key column.

How are dates, booleans and empty values written?

Dates such as 2026-03-14 stay in ISO format, true and false are written as text, and numbers keep their value. Empty or null values become an empty cell by default; you can write null or NULL instead, which helps when the CSV is imported into a database.

Why do accented characters look wrong in Excel?

Excel sometimes reads CSV files with a legacy code page instead of UTF-8. Tick Excel-friendly (UTF-8 BOM) before downloading so Excel recognises the encoding. Some regional versions of Excel also expect a semicolon delimiter.

Is my YAML uploaded anywhere?

No. The YAML is parsed by a JavaScript library running in this page and the CSV is built in your browser, so your data never leaves your device.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

CSV to YAML ConverterConvert CSV rows to a YAML list of mappings with type inference and delimiter detection.YAML to JSON ConverterConvert YAML to pretty or minified JSON, with errors pinned to the exact line.JSON to CSVConvert JSON data to CSV for spreadsheets.YAML Validator & FormatterValidate, format and minify YAML, and convert YAML to JSON or back.JSON to Excel ConverterTurn JSON into a styled .xlsx spreadsheet; nested arrays become their own linked sheets.CSV to JSONConvert CSV data to JSON with live preview.Excel to CSVConvert XLSX spreadsheets to CSV.CSV ViewerOpen a CSV or TSV file as a sortable, filterable table.Excel Viewer (XLSX / XLS)Open XLSX, XLS and ODS spreadsheets in your browser without Excel.Line Ending ConverterConvert text and files between CRLF, LF and CR line endings.Markdown to HTMLConvert Markdown to clean HTML with a live editor.XML to JSONConvert XML to JSON with validation.Text Encoding ConverterDetect and convert text file encodings like UTF-8, UTF-16 and Latin-1.JSON ViewerExplore JSON as a collapsible tree, search keys and values and copy any node's path.TTF to WOFF2 ConverterConvert TTF and OTF fonts to WOFF2 or WOFF and get a ready @font-face CSS snippet.Chmod CalculatorConvert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation.JSON to TypeScriptGenerate TypeScript interfaces or types from JSON, with nested types and optional fields.Morse Code TranslatorTranslate text to Morse code and back, then play it as sound or a blinking light, or save a WAV.HTML Table GeneratorBuild HTML tables in an editable grid with styles, header rows, CSV import and live preview.Hex to Text ConverterConvert hex to text and text to hex with UTF-8 support and space, 0x, \x or comma formats.JSON to XML ConverterConvert JSON to well-formed XML with attributes, arrays and pretty print.JSON to YAML ConverterConvert JSON to clean YAML as you type, with indent, quoting and sort options.HTML to Markdown ConverterTurn HTML or pasted rich text into clean Markdown with tables and live preview.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.JSON ValidatorCheck JSON with the exact line and column of each error, fix tips and one-click auto-fix.Image to Base64Convert images to Base64 data URIs, CSS backgrounds and HTML img tags in your browser.Base64 to ImagePaste a Base64 string or data URI to preview, identify and download the image.JSON CompareCompare two JSON documents and see every added, removed and changed path.Hex to DecimalConvert hex to decimal instantly with steps and signed mode.Decimal to HexConvert decimal to hex instantly with steps and signed mode.Binary to DecimalConvert binary to decimal instantly with steps and signed mode.Decimal to BinaryConvert decimal to binary instantly with steps and signed mode.Two's Complement CalculatorDecimal to two's complement binary and back for 4-64 bits, with invert-and-add-1 steps.XML to CSV ConverterConvert XML to CSV: detects repeating records, flattens nested data, pick your columns.CSV to XML ConverterConvert CSV to well-formed XML with custom root and row names, escaping and pretty print.TOML to JSON ConverterConvert TOML to JSON and JSON to TOML with a full v1.0 parser and clear error lines.JSON to Go StructTurn JSON into Go structs with inferred types, nested structs and json tags.JSON to Python ClassGenerate Python dataclasses, Pydantic models or TypedDicts with type hints from JSON.IP Address ConverterConvert IPv4 to decimal, hex, binary, octal and back, with class and private/public check.ISBN Converter & ValidatorConvert ISBN-10 to ISBN-13 and back, validate check digits and hyphenate, one or in bulk.JSON Flatten / UnflattenFlatten nested JSON to dot or bracket path keys, or unflatten flat keys back to nested JSON.JSON to Dart ClassTurn JSON into Dart model classes with fromJson, toJson, null safety and nested classes.JSON to Java ClassTurn JSON into Java POJOs or records with Lombok, getters/setters and Jackson or Gson annotations.JSON to Kotlin Data ClassTurn JSON into Kotlin data classes for kotlinx.serialization, Gson, Moshi or Jackson.JSON to Markdown TableTurn a JSON array of objects into a GitHub Markdown table with column picker and alignment.JSON to PHP ArrayConvert JSON to PHP array code (short [] or array()) and PHP arrays back to JSON.JSON to Rust StructTurn JSON into Rust structs with serde derives, rename attributes, Option and Vec types.JSON to SQL ConverterConvert a JSON array of objects to CREATE TABLE and INSERT statements for MySQL, Postgres, SQLite.JSON to Swift StructTurn JSON into Swift Codable structs with CodingKeys, optionals and nested types.JSON to TOML ConverterConvert JSON to clean TOML with tables, arrays of tables, inline tables and dates.JSONL to JSON ConverterConvert JSON Lines / NDJSON to a JSON array and back, with line-level error reports.Properties to YAML ConverterConvert Java .properties to nested YAML (application.yml) and YAML back to properties.PX to EM ConverterConvert pixels to em using the parent font size, and em back to px, with conversion tables.Query String to JSONConvert URL query strings to JSON with nested brackets and arrays, and JSON back to a query string.REM to PX ConverterConvert CSS rem values to pixels for any root font size, with a quick 0.25–6rem table.SQL to JSON ConverterConvert SQL INSERT statements and dumps into a JSON array of row objects, with CSV export.TSV to CSV ConverterConvert TSV to CSV and back, or between tab, comma, semicolon and pipe, with correct quoting.TypeScript to JavaScriptConvert TypeScript or TSX to clean JavaScript instantly: strip types, keep or compile JSX.XML to YAML ConverterConvert XML to clean YAML with attributes, text nodes, lists and exact error lines.YAML to XML ConverterConvert YAML to pretty, well-formed XML with custom root, attributes and array item tags.Boolean Algebra SimplifierSimplify boolean expressions or minterm lists to minimal SOP and POS with Quine-McCluskey steps.Compare Excel FilesCompare two Excel spreadsheets cell by cell, highlight changes and export a diff report.CSV CleanerClean messy CSV in one click: trim spaces, drop empty rows and columns, fix headers, dedupe.CSV VLOOKUP ToolJoin two CSV or Excel files on a key column like VLOOKUP, with left, inner and full joins.Remove Duplicates in ExcelFind and remove or highlight duplicate rows in XLSX or CSV files by the columns you choose.GeoJSON ViewerView GeoJSON on a map, inspect and edit properties, validate against RFC 7946 and export.GPX ViewerOpen GPX tracks on a map with distance, elevation profile, moving time, speed and splits.JSON Repair ToolFix broken JSON automatically: trailing commas, quotes, comments, truncated data, with a diff.
See all 129 Data & File Format Converters →