YAML to CSV

Paste YAML and get CSV at once, with errors pointed by line and column, then copy or download the result.

loading YAML to CSV
About this tool

What are YAML and CSV?

YAML describes the same data as JSON with indentation instead of brackets, allows comments and is the language of most configuration files. CSV is a table in plain text: the first line names the columns and each following line is a row, with cells separated by commas (or semicolons, tabs or pipes).

Used to review YAML data in a spreadsheet, such as a list of users, test cases or inventory items, or to hand it to someone who does not read YAML.

This page opens the data converter already set to YAML → CSV. Paste the text, read the result as you type, then copy it or download it as a file. Errors show the line and the column. Nothing is sent anywhere: the conversion runs in your browser.

YAML vs CSV

YAMLCSV
Extension.yaml, .yml.csv
Media typeapplication/yamltext/csv
Commentsyes (#)no
Data typesJSON types plus dates, anchors and aliasestext only (numbers are a reading convention)
Nestingany depth, by indentationnone: one flat table
Typical useKubernetes, Docker Compose, CI pipelinesspreadsheets, exports, bulk imports
SpecificationYAML 1.2.2RFC 4180

When to convert YAML to CSV

  • Convert to CSV when the data goes to a spreadsheet, a database import or a report.
  • Keep YAML when people will read and edit the file by hand.

What changes in the conversion

  • Comments of the YAML file are not carried over: the converter reads the data, and comments are not data.
  • CSV is one flat table, so the input must be a list of objects; the header is the union of all keys, and a nested object or list is written into its cell as JSON text.
  • Anchors and aliases (&base, *base) are expanded into full copies.

How to convert YAML to CSV

  1. Paste your YAML in the input box (the page opens with an example you can replace).
  2. Read the CSV on the right; it updates as you type. If something is wrong, the message says the line and column.
  3. Adjust the options if you need: indentation, sorted keys or type detection.
  4. Copy the result or download it as a .csv file.

Example

This YAML input:

- id: 1
  name: Ana Souza
  city: Recife
  active: true
- id: 2
  name: Bruno Lima
  city: Porto Alegre
  active: false

becomes this CSV, exactly as the converter writes it:

id,name,city,active
1,Ana Souza,Recife,true
2,Bruno Lima,Porto Alegre,false

Frequently asked questions

Is my YAML sent to a server?

No. Conversion happens in your browser, so secrets in a config never leave your computer.

Does YAML to CSV keep comments?

No. Comments are dropped because the converter works on the data itself. Copy important comments by hand; CSV itself has no comment syntax.

What happens to nested data?

YAML nesting: any depth, by indentation. CSV nesting: none: one flat table. A nested value goes into its cell as JSON text.

Report a problem