CSV to YAML Converter

Convert CSV rows to a YAML list.

Click to upload or drag and drop

.csv .tsv .txt

No file at hand?

How to convert CSV to YAML online

  1. 1

    Upload a CSV file or paste CSV data and click "Convert".

  2. 2

    Each row becomes one item in a YAML list, with the header as keys.

  3. 3

    Keep "Convert numbers and true/false" on for typed values, or turn it off to keep everything as text.

  4. 4

    Copy the YAML or download it as a .yaml file.

Example: CSV to a YAML list

CSV input

name,zip,active,salary
Emma,02134,true,98000
"Smith, John",10001,false,65000

YAML output

- name: Emma
  zip: '02134'
  active: true
  salary: 98000
- name: Smith, John
  zip: 10001
  active: false
  salary: 65000

Tips for converting CSV to YAML

Leading zeros are safe

Values like 02134 are quoted, so YAML parsers read them as text instead of the number 2134.

Multi-line values

Cells with line breaks are written as YAML block text, which keeps them readable.

Config and test data

YAML lists work well as seed data, test fixtures and data files for static site generators like Hugo or Jekyll.

Special characters

Values that contain colons, # or quotes are quoted automatically, so the YAML is always valid.

CSV to YAML FAQ

Is the CSV to YAML converter free?

Yes. It is free with no sign-up.

Is my data uploaded?

No. The conversion runs in your browser.

Can I get YAML strings only?

Yes. Turn off "Convert numbers and true/false" and every value is written as text.

Can I convert YAML back to CSV?

Yes. Use the YAML to CSV converter on CSV.ink.