Skip to content
migration.tools
CSV to YAML

CSV to YAML converter

Turn a CSV table into a YAML list of mappings — handy for seeding fixtures, Ansible inventories, Jekyll data files or i18n catalogs from a spreadsheet.

Going the other way? YAML to CSV

Options

CSV

YAML

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your CSV or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the YAML or download it. Drop several files to convert a batch into one ZIP.

How CSV becomes YAML

Every row in the CSV input becomes one record in the YAML output, and the header row supplies the field names. Column order is preserved.

Cells are typed where the meaning is unambiguous: 42 and 3.14 become numbers, true and false become booleans, and an empty cell becomes null. Anything that only looks numeric — 00501, +44 20 7946 0958, a 19-digit order ID — stays a string, because turning it into a number would corrupt it.

CSV and YAML, briefly

CSV is the lowest common denominator for tabular data: every spreadsheet, database and import wizard reads it. It has no types and no nesting, and details such as the delimiter, quoting and encoding vary between programs.

YAML is the configuration format of Kubernetes, Docker Compose, GitHub Actions, Ansible and OpenAPI. It expresses the same structures as JSON with indentation instead of brackets, plus comments and anchors.

Questions

Which CSV dialects are supported?

Comma, semicolon, tab and pipe delimiters are detected automatically. Quoted fields, escaped quotes (""), line breaks inside quotes and a UTF-8 byte-order mark are all handled. If your file has no header row, switch that option off and columns are named column_1, column_2, and so on.

Will the YAML be valid for Kubernetes or CI configs?

The output is standard YAML 1.2 with two-space indentation, and strings that could be misread — like "yes", "0123" or "1e3" — are quoted so they stay strings. Key order follows the input.