CSV to YAML Converter
Convert CSV rows into a YAML list, quoting values YAML would otherwise misread.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the csv to yaml converter
- Paste your CSV.
- Check the YAML output.
- Copy or download it.
About this tool
Each row becomes an item in a YAML list, with the column headers as keys.
The quoting is where this earns its place, because YAML is unusually eager to reinterpret things. A value of <code>yes</code> becomes a boolean in YAML 1.1. A product code of <code>007</code> can lose its leading zeros. A value beginning with a dash reads as a nested list, and one containing a colon followed by a space reads as a nested mapping. Each of those silently changes your data rather than failing, which is the worst kind of bug.
So values are quoted exactly where leaving them bare would change their meaning, and left bare where it would not. Genuine numbers and booleans are emitted as numbers and booleans, matching what the JSON conversion does with the same input.
Parsing handles quoted fields properly, so a comma, quote or line break inside a value does not split it. That is the difference between this and splitting on commas, and it is why exports containing addresses or free-text notes so often arrive mangled.
Everything runs in the page. Spreadsheets are usually the most sensitive files anyone handles — customer lists, payroll, financial records — so a tool that works on them without uploading them is doing the one thing that matters most here.
Common uses
- Turning a spreadsheet of settings into a configuration file.
- Producing seed data for a system that reads YAML.
- Converting a data export for a CI pipeline.
Frequently asked questions
- Why are some values quoted and others not?
- Only where leaving them bare would change the meaning — 'yes' would become a boolean, '007' would lose its zeros, and a leading dash would read as a list.
- Are numbers kept as numbers?
- Yes. Values that are genuinely numeric or boolean are emitted as such, matching what the JSON conversion produces from the same input.
- Does it handle nested data?
- No. A CSV is flat by nature, so the output is a flat list of mappings.
Related tools
CSV to JSON
Convert CSV into an array of JSON objects, with delimiter detection and optional typing.
CSV to XML Converter
Convert CSV rows into XML records, with names and values escaped correctly.
JSON ↔ YAML Converter
Convert JSON to YAML or YAML back to JSON, in either direction, with indent control.
CSV Validator
Check a CSV for ragged rows, duplicate headers and structural problems before importing it.