ToolConvoyToolConvoyv2.6
DATA

CSV to YAML — Convert CSV Data to YAML

Convert CSV data to YAML with list-of-maps, list-of-lists, or single-map output. Runs entirely in your browser. No uploads, no accounts, no limits.

● LOCAL · ZERO-COPY PIPELINE0 network requests since page load

CSV to YAML is the right conversion when the destination is a config file, a deployment manifest, or a document that humans will edit by hand. YAML is a superset of JSON that adds comments, multi-line strings, and a more readable block style — and it is the default format for Kubernetes resources, Ansible playbooks, GitHub Actions workflows, GitLab CI pipelines, Docker Compose files, and most modern infrastructure-as-code tools. The conversion from CSV is straightforward: each row becomes a YAML mapping, the whole document becomes a sequence of mappings, and the result is a file that any of those tools can read.

The non-obvious thing about CSV-to-YAML is type inference. CSV has no type system — every value is text — but YAML has strings, numbers, booleans, and null. A CSV cell with the value true is ambiguous: it could be the YAML boolean true or the YAML string \"true\". The tool infers types for common cases (booleans, integers, floats, null) and quotes the rest as strings, but the inference is conservative — a column where every value is a number is emitted as YAML numbers, but a column with even one non-numeric value is emitted as strings. For the few cases where this is wrong (a ZIP code column that is all numbers, a phone number that starts with a +), the tool has a ‘quote all as strings’ option to disable type inference entirely.

For a final hand-off: if the destination is a Kubernetes manifest, paste the output into a ConfigMap’s data field, a Secret’s data field, or a custom resource definition. If the destination is Ansible, the list-of-maps output is the standard shape for play entries and inventory groups. If the destination is a GitHub Actions workflow, the YAML is paste-compatible with the workflow editor’s import feature. If the destination is a custom config file format, validate the output against the format’s schema after conversion — YAML’s type inference is the most common source of subtle bugs in this kind of pipeline.

How to use

  1. Paste your CSV data

    Drop the CSV into the input area, or load a .csv file. The tool auto-detects the delimiter (comma, semicolon, tab) and the presence of a UTF-8 BOM. The first row is treated as the header by default.

  2. Pick a YAML structure

    Choose between list-of-maps (a YAML sequence of mappings, the most common shape for config), list-of-lists (compact, no header dependency), or single-map (a flat mapping, useful for simple key-value exports).

  3. Copy or download the YAML

    Copy the YAML to your clipboard, or download it as a .yaml file. The output is a single self-contained YAML document — paste it into a Kubernetes manifest, an Ansible playbook, a GitHub Actions workflow, or a Docker Compose file.

Frequently asked

What is the most common YAML output shape?

List-of-maps is the standard for tabular data. Each row becomes a YAML mapping (one key per column), and the whole document is a sequence of those mappings. This is the shape most tools (Ansible, Kubernetes, GitHub Actions) expect for table-like input.

How are YAML special characters handled?

YAML is whitespace-significant, so values that start with a special character (`-`, `?`, `:`, `#`, `&`, `*`, `!`, `|`, `>`, `'`, `"`, `%`, `@`, ``` ` ```) are wrapped in quotes automatically. Strings that contain newlines use the YAML `|` block scalar style.

Will the first row be the keys?

Yes — the first row is the header in list-of-maps and single-map modes. The keys are exactly the column names from the header. If the CSV has no header, toggle the 'no header' option to use generic `column1`, `column2` keys instead.

Can I choose between block style and flow style?

The default is block style (the readable, indented form). Toggle to flow style for the inline JSON-like form (`[{a: 1, b: 2}, {a: 3, b: 4}]`). Block style is easier to read and to diff; flow style is more compact.

Is the output valid for Kubernetes and Ansible?

Yes — list-of-maps is the shape both expect. For Kubernetes, the output is a list of objects suitable for `ConfigMap` data, `Secret` data, or a custom resource definition. For Ansible, it is a list of play entries or inventory groups.

Limitations

  • No nested structureCSV is a flat grid. The YAML output is also flat — each row has the same keys, and there is no way to represent nested objects or arrays. For hierarchical data, start from JSON or YAML directly.
  • No YAML anchors or aliasesThe tool does not emit YAML anchors (`&name`) or aliases (`*name`) for repeated values. If the destination is a Kubernetes manifest, you may want to factor out common values into a Helm chart or a Kustomize overlay.
  • No comment preservationCSV has no comment syntax, so the YAML output has no comments. If the destination needs documentation, add the comments in the YAML file by hand after the conversion — most YAML editors support comment folding.

Platform notes

macOS
For command-line work, `python3 -c "import csv, yaml; ..."` does the conversion. The browser tool is the right pick for one-off conversions where opening a Python REPL is not worth the setup time.
Windows
PowerShell's `Import-Csv` plus `ConvertTo-Yaml` from the powershell-yaml module handles the conversion. The browser tool is the right pick for cross-platform YAML output that any YAML parser (Python, Go, Ruby) can read.
Linux
The closest CLI equivalent is `yq` (the mikefarah version): `yq -P input.csv` reads CSV and emits YAML. The browser tool is the right pick for content pasted from a chat, an email, or a documentation page where retyping is impractical.
Web
Runs entirely client-side. Works offline once the page has loaded. The YAML output is portable — paste it into any YAML parser, config file, or deployment manifest without dependencies.

Related tools