CSV to YAML Converter
Turn a spreadsheet export into YAML: every row becomes a map in a YAML list, numbers and booleans become real values, and headers like address.city can nest.
CSV to YAML Converter
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Add your CSV
Paste it into the left box, press Open file, or drag a .csv file onto it. Sample loads a realistic example.
Set the options
Adjust the options above the boxes — the output updates instantly as you change them.
Check the result
Read the status line: it reports rows, keys and any value that couldn't be represented in YAML.
Copy or download
Copy the YAML or download it as a .yaml file. Nothing was uploaded at any point.
Name columns like social.github and tick Nest dotted headers to build nested YAML from a flat sheet.
Features
Delimiter auto-detection
Comma, semicolon, tab or pipe is sniffed from the first lines — European Excel exports with ; just work.
Header row or not
Use the first row as field names, or treat every row as data with generated column1, column2… names.
Real types, not just strings
Numbers, booleans and empty values are detected — while codes with leading zeros such as 00742 or +44 phone numbers stay text.
Rebuild nested objects
Headers like address.city can be folded back into nested objects instead of flat dotted keys.
Document marker
Optionally start the file with --- for tools that expect an explicit YAML document.
Private by design
Parsing and conversion run in your browser with JavaScript — your data is never uploaded, logged or stored.
About the CSV to YAML Converter
YAML data files — Jekyll and Hugo _data files, Ansible inventories and variables, test fixtures, i18n strings — are often maintained in a spreadsheet and exported as CSV. Converting CSV to YAML gives you a list of maps: one - entry per row, one key: value per column, keyed by the header row.
The CSV is read with an RFC 4180 parser, so quoted commas and line breaks inside cells are handled, and the delimiter is detected automatically. With Detect numbers & booleans on, 42, 3.5, true and false become YAML numbers and booleans, empty cells become null, and values with leading zeros (007, ZIP codes) stay strings. Tick Nest dotted headers to turn columns like address.city and address.zip into a nested address: map.
On output, any string YAML would reinterpret — yes, no, on, off, a date like 2026-10-21, a time like 12:30 — is quoted, so a country code column containing NO for Norway doesn't turn into false.
Examples
A team list for a static-site data file, with a country code that YAML 1.1 would read as false and a dotted header to nest.
name,role,country,social.github,since
Ada Lovelace,Engineer,GB,ada,2024
Ola Nordmann,Designer,NO,olan,2025
Grace Hopper,Admiral,US,,2023- name: Ada Lovelace
role: Engineer
country: GB
social:
github: ada
since: 2024
- name: Ola Nordmann
role: Designer
country: "NO"
social:
github: olan
since: 2025
- name: Grace Hopper
role: Admiral
country: US
social:
github: null
since: 2023This output was produced by the converter on this page with Nest dotted headers switched on — load it with the “Team data file” preset above and change any option to see the effect.
How CSV maps to YAML
| In CSV | Becomes in YAML |
|---|---|
| Header row | the keys of every map |
| Each data row | one list entry - key: value |
42, true | 42, true (typed) |
007 | "007" (string, zeros kept) |
| Empty cell | null |
Header address.city + Nest | address: / city: … |
NO (Norway) | "NO" — quoted so it stays a string |
Things that trip people up
- The Norway problem. YAML 1.1 parsers read NO, yes, on and off as booleans. The output quotes them, but if you edit the YAML by hand later, keep them quoted.
- Numbers you want as text. Phone numbers and IDs without leading zeros (like 9876543210) become numbers. Untick Detect numbers to keep every value as a string.
- Duplicate headers. YAML maps can't have two equal keys; with two columns of the same name the later one wins. Rename duplicates first.
- Dates. Dates are written as quoted strings. If a static-site generator expects a date object, remove the quotes for that field.
CSV vs YAML at a glance
| Property | CSV | YAML |
|---|---|---|
| Specification | RFC 4180 (2005) | YAML 1.2.2 (2021) |
| File extension | .csv | .yaml / .yml |
| Media type | text/csv | application/yaml (RFC 9512) |
| Data types | text only — every cell is a string | string, int, float, bool, null, map, sequence (+ dates in many parsers) |
| Comments | No | Yes # |
| Nesting | None (flat rows) | Unlimited (indentation) |
- CSV: Fields containing a comma, a double quote or a line break must be wrapped in double quotes, and a quote inside is written twice ("").
- YAML: YAML 1.2 is a superset of JSON; YAML 1.1 parsers (still common) also read yes/no/on/off as booleans — the “Norway problem”.