CSV to YAML
Convert CSV rows into a YAML list, using the header row as keys — handy for fixtures, Ansible variables or static-site data files. Quoted fields and commas inside values are handled. Runs in your browser.
Suggested tools
About CSV to YAML
CSV to YAML converts rows of a spreadsheet into a YAML list, using the header row as the keys of each item. It is handy for test fixtures, Ansible or Kubernetes variables, static-site generators (Jekyll, Hugo) and any config that is easier to keep in YAML than in a spreadsheet.
Quoted fields, commas inside values and line breaks are parsed correctly, and the YAML is written with standard two-space indentation without wrapping long lines. Everything runs locally in your browser — the text you paste is never uploaded.
How to use CSV to YAML
- Paste CSV with a header row, or upload a .csv file.
- Press Convert.
- Copy or download the YAML list.
Key features
- Header row becomes the keys of every item
- RFC-4180 CSV parsing (quotes, commas, line breaks)
- Two-space indentation, no line wrapping
- Reverse conversion available with YAML to CSV
Example
Codes such as 007 are kept as text.
id,name,code 1,Asha,007 2,Ravi,042
- id: '1' name: Asha code: '007' - id: '2' name: Ravi code: '042'
When to use CSV to YAML
- Creating data files for Jekyll, Hugo or other static-site generators.
- Turning a spreadsheet of hosts or users into Ansible variables.
- Generating YAML test fixtures from a CSV export.
Tips and common problems
- Every value is kept as text; change types by hand if your tool needs numbers.
- Use simple header names without spaces — they become YAML keys.
- Comma, semicolon and tab separators are detected automatically.
Frequently asked questions
Every cell is kept as text, exactly as it appears in the CSV, so codes such as 007 or phone numbers never lose digits. Number-like values are quoted in the YAML ('42') to show they are text.
Each row becomes one flat item. For nested structures, convert to JSON first with CSV to JSON (which understands dot-notation headers) and then use JSON to YAML.
Yes. The separator — comma, semicolon or tab — is detected automatically from the header row.