CSV to YAML Converter Online — Free & Private

Useful when analysts hand off CSV extracts that GitOps reviewers prefer as indented YAML lists.

Loading…
CSV → YAML for spreadsheet rows and GitOps lists
Useful when analysts deliver CSV and your platform expects reviewable, indented YAML.

Developer notes

Scalars are not cast. YAML receives strings. Align the quoting mode with your team’s style guide.

Use cases

Turn a support-ticket CSV export into a list that Ansible can use. Show how tabular data nests as YAML.

About these options

For CSV output, choose the delimiter, how fields are quoted, the line endings and whether to write a header row. Auto uses a comma in English and a semicolon in French, German and Spanish, as Excel expects. For CSV input, the delimiter is detected on the first line (comma, semicolon, tab or pipe). You choose whether that line holds the column names. JSON output can use 2 or 4 spaces or a single line, with an optional recursive key sort. XML output can be pretty-printed with a chosen indent width. YAML output takes an indent width and a quoting mode for strings. XML comments are dropped, because the conversion goes through a JSON tree.

Examples

Product table

Input

sku,name,qty,price WB-001,Wireless Ergonomic Mouse,120,24.99 WB-002,USB-C Hub Pro Adapter,85,49.50 WB-003,Mechanical Keyboard RGB,42,89.00 WB-004,Adjustable Monitor Stand,67,35.25

Output

- sku: WB-001 name: Wireless Ergonomic Mouse qty: 120 price: 24.99 - sku: WB-002 name: USB-C Hub Pro Adapter qty: 85 price: 49.50 - sku: WB-003 name: Mechanical Keyboard RGB qty: 42 price: 89.00 - sku: WB-004 name: Adjustable Monitor Stand qty: 67 price: 35.25

Semicolon-delimited file

Input

id;city;country 1;Paris;FR 2;Berlin;DE 3;Madrid;ES 4;Rome;IT

Output

- id: 1 city: Paris country: FR - id: 2 city: Berlin country: DE - id: 3 city: Madrid country: ES - id: 4 city: Rome country: IT

Related tools

Export XML with CSV → XML, structured JSON with CSV → JSON, or go the other way with YAML → CSV.

CSV → YAML FAQ

How the YAML is written

Quoted scalars?

They follow the YAML string quoting option. The output is deterministic and does not preserve the source quoting.

Maps or lists?

Uniform rows become a sequence of mappings.

Comments?

Add them by hand after the conversion.

Delimiter mistakes?

A wrong delimiter produces many warnings. Adjust the CSV input options.

Convert CSV to JSON, XML, YAML, TOML and TSV.