CSV to YAML Converter
Turn a spreadsheet export into a YAML sequence — the usual first step when a list maintained in a spreadsheet has to become configuration.
Input
CSV- characters
- 0
- lines
- 0
- size
- 0 B
Options
Off by default: it would turn the identifier 007 into the number 7.
About this tool
Reference data has a way of living in a spreadsheet long after the system that consumes it has moved to YAML. Feature flags, region lists, rate tables and seed data all tend to start as a shared sheet, and converting the export by hand is both tedious and the kind of task where a single misplaced indent costs an afternoon.
The parser detects the delimiter rather than assuming a comma, which matters because a spreadsheet saved in a locale that uses the comma as a decimal separator will export semicolons. Quoted fields containing delimiters, quotes and line breaks are handled properly.
By default every value stays a string, which is the safe choice: it is the only way to guarantee that a product code, a version number and a leading-zero identifier survive the trip. Turn on type inference when you want real numbers and booleans in the output.
How to use this tool
Paste CSV, or upload a .csv or .tsv file exported from your spreadsheet.
Leave the delimiter on Auto unless detection gets it wrong.
Turn on "Infer types" if you want numbers and booleans rather than strings.
Press Convert, then copy or download the YAML.
Key features
- Automatic delimiter detection for comma, semicolon, tab and pipe
- Quoted fields containing delimiters, quotes and newlines parsed correctly
- Optional type inference for numbers, booleans and nulls
- Configurable handling of empty cells — empty string, null, or omitted
- Byte order marks stripped from spreadsheet exports
- Output quoted against the YAML 1.1 rules, so older loaders read it the same way
Example
Input — CSV
sku,name,quantity
TENT-2P,Two Person Tent,34
LAMP-USB,USB Camp Lamp,210Output — YAML
- sku: TENT-2P
name: Two Person Tent
quantity: "34"
- sku: LAMP-USB
name: USB Camp Lamp
quantity: "210"Good to know
- CSV is flat, so the result is a flat sequence of mappings. Nested structure cannot be recovered from columns unless you rebuild it afterwards.
- With type inference off, every value is a string. With it on, a value such as 007 is deliberately kept as a string because it is almost always an identifier.
- Only the first sheet of a pasted range is converted — CSV has no concept of multiple sheets.
Frequently asked questions
Why are my numbers quoted in the output?
Type inference is off by default, so every cell stays a string. Turn on "Infer types" and plain numbers and booleans become real YAML scalars.
My file uses semicolons. Will that work?
Yes. Detection handles semicolons, tabs and pipes as well as commas, which covers the exports produced by spreadsheets in most European locales. You can also set the delimiter explicitly.
Why does the output quote values like yes and no?
Because YAML 1.1 loaders — which includes PyYAML and most Ruby and Go libraries — read a bare yes as a boolean. Quoting them keeps the string a string everywhere, not just in a modern parser.
Can I get nested YAML instead of a flat list?
Not directly from CSV, because the columns carry no nesting information. Convert to JSON first and use the JSON Flattener in reverse if your headers encode paths such as address.city.
Your data stays on your device
Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.
Related tools
- YAML to CSVConvertersFlatten a YAML sequence into spreadsheet columns, with nested keys as paths.YAMLCSV
- CSV to JSONConvertersParse CSV into a JSON array with delimiter detection and optional type inference.CSVJSON
- JSON to YAMLConvertersConvert JSON into readable YAML for Kubernetes, CI pipelines and app configuration.JSONYAML
- YAML FormatterDeveloper ToolsNormalise YAML indentation across a whole stream while keeping every comment.YAMLYAML
- CSV to XMLConvertersTurn CSV rows into XML records with configurable root and row element names.CSVXML