Monitoring
Solutions
Resources
Free Tools
Pricing
Free Tools / Converters / CSV to YAML Converter

CSV to YAML Converter

Paste CSV and get a YAML list with one item per row. Useful for turning a spreadsheet of hosts, users or settings into something Ansible, a test fixture or a config file can read.

Runs entirely in your browser — nothing you enter here is sent to a server.

From a spreadsheet to a YAML list

Inventories tend to start life in a spreadsheet: a list of servers, a table of users to create, a set of feature flags per environment. The tools that act on them — Ansible, Helm, test frameworks, static site generators — want YAML. Retyping fifty rows by hand invites mistakes; converting them takes a second.

Each row becomes one item in a YAML sequence, and each column becomes a key in that item. The result can be pasted under any key of an existing file, for instance as an Ansible variable looped over with loop: "{{ servers }}".

Types are detected

443 is written as a number and true as a boolean, so templates and conditions work without casting. Empty cells become null.

Quoting where needed

Text that YAML could misread — values with a colon and space, or words such as yes and no — is quoted automatically.

IP addresses and versions

10.0.1.11 stays a string, because it is not a valid number. A version such as 1.10 would become the number 1.1 — turn type detection off to keep it.

Any delimiter

Comma, semicolon, tab and pipe are detected from the first line, so a copy-paste straight from a spreadsheet (tab-separated) also works.

Tips for clean results

Name the columns the way you want the keys to read — lower case, underscores instead of spaces — before converting; it saves editing afterwards. If a column should always be text, such as a phone number or an id with leading zeros, the leading zero already protects it; otherwise untick type detection and every value is written as a string.

Frequently asked questions

What does the YAML output look like?

A sequence: each row starts with "- " followed by its first key, and the remaining keys are aligned underneath. It is the same structure as a JSON array of objects.

Can I paste cells straight from Excel or Google Sheets?

Yes. Copied cells are tab-separated, and the tab delimiter is detected automatically.

How do I use the result in Ansible?

Put it under a variable name in a vars file — for example "servers:" followed by the indented list — and iterate over it with loop.

How are empty cells handled?

They are written as null when type detection is on, or as empty strings ("") when it is off.

Related free tools

A calculator answers once. Monitoring answers every minute.

Upzilla checks your sites, servers and APIs around the clock and alerts you the moment something breaks. 10 monitors free, no card required.

Start monitoring free →