DT Dev Tools

CSV to YAML Converter

Convert CSV to YAML online. Paste or drop a CSV/TSV file and get a clean YAML list with typed values and nested keys. Free, private and runs in your browser.

πŸ”’ Runs entirely in your browser β€” nothing is uploaded

Drop a .csv / .tsv file here, or click to choose

Advertisement

Convert CSV to YAML for configs, fixtures and data files

YAML is the format of choice for configuration and data that humans edit: Kubernetes and Helm values, Ansible inventories and variables, GitHub Actions matrices, static-site data files in Hugo, Jekyll or Eleventy, i18n catalogs and test fixtures. That data often starts life in a spreadsheet. This CSV to YAML converter turns rows into a readable YAML list of mappings in one step, right in your browser β€” paste the table, drop a .csv or .tsv file, or load the sample.

The first row provides the keys and every following row becomes one list item. Quoted CSV fields with commas or line breaks are parsed correctly, and the YAML writer quotes any string that would otherwise be misread β€” values like yes, off, null or text containing a colon β€” so the result loads back with the exact values from your sheet.

Types, nesting and a top-level key

Keep Detect numbers & booleans on to emit real YAML numbers and booleans; leading-zero codes and very long IDs stay as strings, and empty cells become null. Turn on Nest dotted headers to build structure from flat columns: server.host and server.port become a nested server: mapping. Use Wrap in key to put the list under a name such as users: so it can be merged into an existing file.

Tips and related tools

Check indentation-sensitive files with a YAML linter before committing, and keep secrets out of version control. To go the other way, use YAML to JSON or JSON to YAML. The same spreadsheet can also be turned into JSON, XML or token-efficient TOON for LLM prompts. All processing is local, so internal inventories and customer data never leave your machine.

How to use

  1. Add your CSVPaste CSV or TSV text, drop a .csv file, or click Load sample. The delimiter is detected automatically.
  2. Adjust the optionsChoose header, type detection and nesting, and optionally wrap the list in a top-level key.
  3. Copy or download the YAMLCopy the YAML or download it as a .yaml file.

Frequently asked questions

What YAML does the converter produce?
A YAML sequence (list) with one mapping per CSV row, where keys are the column headers. Fill in Wrap in key to place the list under a top-level key such as users:.
Are numbers and booleans kept as types?
Yes, with Detect numbers & booleans on. Leading-zero values like 00501 and very long IDs stay strings so nothing is changed by accident; empty cells become null.
Can I get nested YAML from a CSV?
Yes. Enable Nest dotted headers and a column such as db.host becomes db: with a nested host: key.
Are values that look special in YAML quoted?
Yes. Strings such as yes, no, null or ones containing : are quoted automatically so the YAML reads back exactly as in the CSV.
Is my data uploaded?
No. Conversion runs entirely in your browser.
Advertisement