Static-site generators, Ansible, Home Assistant and many CLI tools read their data from YAML, while the list you maintain lives in a spreadsheet. This tool converts a CSV into a YAML sequence where each row becomes an item with one key: value line per column, using the header names as keys.
Paste the CSV, click Convert and copy the YAML from the result box. The conversion runs in your browser without uploading anything, so it is safe for configuration data that contains hostnames or internal identifiers.
How to use CSV to YAML step by step
Paste the comma-separated CSV into the left box. The first line must hold the column names, which become the YAML keys.
Click "Convert to YAML". The result appears on the right as a list of items.
Click "Copy" to place the YAML on the clipboard and paste it into your file.
Input and output example
Input
name,age,city
Juan,30,Madrid
Ana,25,Barcelona
Output
-
name: Juan
age: 30
city: Madrid
-
name: Ana
age: 25
city: Barcelona
Why use our CSV to YAML?
100% free and online: no payments, no software or extensions to install.
Privacy-first: processing happens in your browser, your data never leaves your device.
No sign-up: paste your data and get the result in one click.
Fast and reliable: handle small or large files in seconds, ready for Excel and other tools.
Common use cases
Generate the _data/team.yml file of a Jekyll or Hugo site from a spreadsheet maintained by the marketing team.
Create an Ansible inventory or a list of hosts from a CSV exported from a CMDB.
Produce YAML fixtures for Rails, Symfony or Django tests from tabular data.
Convert a translations or settings table into YAML for a configuration repository.
Limits and tips
Values are written verbatim without quoting. A value containing a colon followed by a space, a leading #, or starting with characters such as [ { * & will break YAML parsing; quote those cells manually afterwards.
The parser splits on commas only and does not understand quoted fields, so "Madrid, Spain" becomes two columns.
Numbers stay unquoted, which YAML parsers read as integers or floats; values like 007 will lose their leading zero when parsed as numbers.
Each item begins with a bare dash on its own line followed by two-space-indented keys, which is valid YAML and easy to diff.
Frequently asked questions
What does the YAML output look like?
A block sequence: each CSV row becomes an item introduced by a dash, and each column becomes an indented key: value line, in the same order as the CSV header. The result is a list of mappings, the most common shape for data files in YAML.
What is the difference between YAML and JSON?
Both represent objects and lists. JSON uses braces, brackets and quotes and is strict and compact, ideal for APIs. YAML relies on indentation, allows comments and needs fewer quotes, which makes it the preferred format for configuration files. Any JSON document is also valid YAML.
Why does my YAML fail to load after conversion?
Most often because a value contains a colon and a space, starts with a special character, or is a string that YAML interprets as another type (yes, no, null, 1e3). Wrap such values in quotes in the YAML, or clean them in the CSV before converting.
Can I convert a semicolon-separated CSV?
Not directly, since only commas are recognised as separators. Convert the file to commas first with the CSV to Delimited tool (from the other direction) or by re-exporting from Excel with comma separators.
Is there a download button?
The result is shown in a text box with a Copy button; paste it into a .yml or .yaml file in your editor. Nothing is uploaded and the conversion happens entirely in your browser.