CSV to YAML List Converter
Convert a CSV with a header into a YAML list of objects, preserving numbers and booleans. Useful for building config files and fixtures from spreadsheets.
—
CSV to a YAML list
Turning a spreadsheet into a YAML list is what you do to populate a configuration file, feed an Ansible inventory or build sample data for a test. The manual route is typing key and value line by line with the right indentation, and the chance of a mistake grows with the number of columns.
Paste the CSV with headers on the first line and receive a list where each record becomes an item, using the column names as keys. Values gain types by shape: numbers stay unquoted, the booleans true and false stay unquoted, and everything else comes out quoted with internal quotes escaped — which avoids YAML's classic trap of a string being reinterpreted as another type.
The CSV reader here is a simple one: it splits on the comma without handling quotes. That means a quoted field containing a comma will be broken into two columns. For spreadsheets with addresses, descriptions or decimal values using commas, convert first to a separator that does not appear in the content — the CSV to PSV page handles that step.
Frequently asked questions
Why do strings come out quoted?
Can it produce a map instead of a list?
Does the indentation come out right?
Related Tools
YAML to TOML Converter
Convert config files from YAML to TOML right in your browser, preserving strings, numbers and booleans. Handy for migrating configs between formats.
TOML to YAML Converter
Convert config files from TOML to YAML right in your browser, preserving strings, numbers and booleans. Handy for migrating configs between formats.
JSON Lines → CSV
Convert JSONL (NDJSON) file to CSV, deriving headers from the union of all observed object keys.
YAML to NDJSON Converter
Explains how to represent YAML lists as NDJSON (one JSON object per line) with practical examples.
TOML to INI Converter
Converts simple TOML (with [section] and key = value) to INI — strips quotes from strings.
JSON to YAML
Convert JSON data to YAML format.