CSV to YAML Converter
This CSV to YAML converter turns each row into a YAML mapping in a list, keyed by the header row, producing output ready to paste into a config file, a fixture or a seed data file. Every CSV cell is text but YAML has real types, so values that look like numbers or booleans are written as numbers and booleans — which is what a config parser downstream expects. Type detection deliberately stops short of values with leading zeros: a postcode like 01730 or an order ID like 007 stays a string, because converting it to a number would silently destroy it. The delimiter can be comma, semicolon, tab or pipe, and everything runs in your browser.
How it works
Each row becomes one YAML mapping in a list, keyed by the header row. The result is ready to paste into a config file, a fixture or a seed data file.
Type detection turns 42 into a number and true into a boolean. It deliberately leaves values with leading zeros alone, so postcodes and IDs are not damaged.
The conversion runs entirely in your browser — nothing you paste or upload is sent to a server.
How to convert CSV to YAML
- Paste your CSV, or upload a
.csv/.tsvfile. - Set the delimiter and confirm whether the first row holds column names.
- Copy the YAML list on the right into your config, fixture or seed file.
Type detection, and where it stops
Every CSV cell is text, but YAML has real types — so 42 is written as a number and
true as a boolean, which is what a config parser downstream expects. Detection deliberately stops
short of values with leading zeros: a postcode like 01730 or an order ID like 007 stays
a string, because turning it into a number would silently destroy it. Switch detection off entirely to keep every
value quoted as text.
Common use cases
- Turning a spreadsheet of settings into a YAML configuration file.
- Generating seed data or test fixtures from a data export.
- Converting a translation or content sheet into a YAML data file for a static site.
Frequently asked questions
How do I convert CSV to YAML?
Paste your CSV or upload a .csv or .tsv file, confirm the delimiter and whether the first row holds column names, and copy the YAML list from the right panel.
Does it convert numbers and booleans to real types?
Yes. Cells that look like numbers become numbers and true or false become booleans, so a config parser reading the output gets the types it expects rather than quoted strings.
Will it damage postcodes or IDs with leading zeros?
No. Values with leading zeros are deliberately left as strings, because converting 01730 to a number would silently drop the zero. Turn type detection off entirely to keep every value as text.
What if my CSV uses semicolons or tabs?
Choose the matching delimiter above — comma, semicolon, tab and pipe are all supported — and uploading a .tsv file selects tab automatically.
What happens without a header row?
Uncheck the header option and the keys become col1, col2 and so on, so the structure is still valid YAML you can rename afterwards.
Is my CSV data uploaded?
No. The file is read and converted entirely in your browser, so nothing is transmitted to a server.
Related tools
YAML to CSV Converter
This YAML to CSV converter turns a list of mappings into spreadsheet rows and columns.
CSV to JSON Converter
This CSV to JSON converter turns CSV rows into a JSON array, keyed automatically by the header row.
CSV to XML Converter
This CSV to XML converter turns each row into an element, with column names made valid automatically.