DataShift

Convert CSV to YAML Online

Turn a spreadsheet or CSV export into a YAML list — useful for config files, fixture data, and Ansible inventories.

CSV → YAML

Free CSV to YAML converter. Each CSV row becomes a YAML list item. Handles typed values and dot-notation headers for nested output. Works in your browser.

100% local — no uploads
Input · CSV

Output will appear here

How to use the CSV → YAML

  1. Paste or upload your CSV data

    Paste text directly into the input box, drag and drop a file onto it, or click "Upload file" to browse. Conversion starts instantly on paste — no button click required.

  2. Configure options (optional)

    Open the Options panel to customise delimiter, headers, nested-object flattening, and more. Use the Field Selector to pick exactly which columns appear in the output.

  3. Copy or download your YAML

    Click Copy to grab the result, or Download to save the file. Everything runs locally in your browser — no data ever leaves your device.

Frequently Asked Questions

Is my data safe?
Yes. Every conversion runs entirely inside your browser. No data is ever transmitted to a server. The tool works offline once loaded.
What is the maximum file size?
There is no hard limit. Files under 1 MB convert instantly. Files 1–10 MB show a progress indicator. Files over 10 MB prompt a warning and run in a background thread to keep the browser responsive.
Why does my CSV fail to parse?
Common causes are trailing commas, single-quoted strings, unquoted keys, or missing closing brackets. The converter auto-repairs many of these and tells you exactly what it changed.
Can I convert multiple files at once?
The tool handles one file at a time. For bulk conversion, consider the csvjson CLI or API.

How it works

Step 1

Each row becomes a YAML list item

The output is a YAML sequence of mappings — one mapping per CSV row, with keys from the header row.

Example

Server inventory CSV to Ansible YAML

Input
hostname,ip,role,os
web-01,10.0.1.1,web,ubuntu22
db-01,10.0.1.2,database,ubuntu22
Output
- hostname: web-01
  ip: 10.0.1.1
  role: web
  os: ubuntu22
- hostname: db-01
  ip: 10.0.1.2
  role: database
  os: ubuntu22

Frequently asked questions

Can I get nested YAML output from dot-notation CSV headers?

Yes. A column named `server.ip` will produce a nested `server: { ip: ... }` structure in the YAML output.