The quick answer
This page, as shipped, does not convert: paste CSV into the input panel and the output panel echoes it back unchanged, under a note reading "CSV → JSON → YAML runs in the live converter below", with no converter below it. No YAML is produced in the current build, and the gap is logged as a bug on this site. The method the page was built to run is documented below in full, with its exact coercion rules and the routes that produce YAML today.
What the page does today
The rendered tool is the site's standard two-panel transform layout. An input panel takes your paste, a Clear button empties it, and an output panel labeled Converted output sits beside it with Copy and Download buttons; the download is named csvToYaml.txt. Type or paste CSV and the output updates live, but for this page the transform is a passthrough: the output text is your input text, word for word, with a note underneath that reads "CSV → JSON → YAML runs in the live converter below".
There is nothing below. The note describes a live converter this build does not include: the page routes to a passthrough that keeps the text as-is, while the component that does the real work (an RFC 4180 CSV parser feeding a YAML dump) exists in the codebase but is not wired to this page. That is a dormant stub, the same class of gap documented on the CSV to LaTeX Table page, and stating it plainly beats pretending the conversion runs.
The practical consequences are concrete. Copy and Download hand back your pasted CSV unchanged, so nothing is lost, but nothing becomes YAML either. The rest of this page documents the method the page was meant to run, so you can execute it by hand or recognize the output the day the fix ships, plus the routes that produce YAML today.
The method: RFC 4180 parse, type, dump
Stage one is the CSV parse, and no parser here is a guess: a character-by-character RFC 4180 state machine walks quoted fields, doubled quotes and embedded commas or newlines, so a cell like "Smith, John" survives intact. The comma is the delimiter this page expects, RFC 4180's common case, and there is no delimiter control to change it. The header row supplies each record's keys, trimmed of surrounding whitespace, and every data row becomes one record.
Stage two is the coercion, and it happens at the CSV-to-JSON step of the pipeline. Cells are trimmed, then typed: a plain integer or decimal (with optional minus) becomes a number, so 30 lands as the YAML scalar 30; true and false in either case become booleans; everything else stays a string, and an empty cell stays an empty string, not null. The coercion is policy rather than accident, and the flip side is the leading-zero trap: 02134 matches the numeric pattern and comes out as 2134, so zip-style values need quoting by hand when the zero matters.
Stage three is the dump: the records serialize as a YAML list in block style, one list item per row, keys in header order, 2-space indent, never tabs (YAML forbids tabs in indentation outright). Strings are quoted only when YAML requires it, so a value carrying a colon or a leading special character gets quotes and most values do not. Aliases and anchors (&anchor / *alias) are legal YAML, but this dump spells every row out in full.
What the output looks like
Input
name,category word counter,text json formatter,developer
Output
- name: word counter category: text - name: json formatter category: developer
Two list items, two spaces of indent, keys straight from the header. This is the shape the pipeline produces, recomputed by hand against its code, and the page as shipped will instead hand you back the input text until the stub is wired. The block doubles as a regression tripwire: the day the live output stops matching the input, the fix has shipped, and this section retires.
Input
name,age,active Alice,30,true
Output
- name: Alice age: 30 active: true
The age lands as the scalar 30 and the active flag as the boolean true, exactly per the coercion rules above. An empty cell in the same file would land as an empty string, visible as '' in the output rather than silently null; edit such fields after conversion if your downstream system wants nulls. That visibility is deliberate: an empty string is a fact about the file, and null is a guess the pipeline refuses to make for you.
Routes that produce YAML today
Until the page converts, three routes cover the need. The CSV to JSON Converter on this site is a working engine with a delimiter dropdown: it runs the first stage of the pipeline exactly (RFC 4180 parse plus the same coercion) and hands you JSON. From JSON, any local YAML serializer finishes the job, from the YAML library in whatever language you already use (PyYAML, js-yaml, yaml.go) to a one-liner such as python3 -c "import json,sys,yaml; print(yaml.safe_dump(json.load(sys.stdin)))". Nothing in that chain uploads anything.
The second route is hand-writing the YAML for small files, using the mapping rules above: each row is a list item, each header cell a key, values typed per the coercion rules. For a dozen rows that is a five-minute job, and you will understand the file better for having written it. The third route is a local command-line tool (yq or its kin) for people who live in a terminal; the comparison below carries the trade-offs.
| Route | What it buys | Where it costs |
|---|---|---|
| This page (as shipped) | Paste, inspect, copy: the parsing side and the method documentation are real | Does not convert yet; the output echoes the input until the stub is wired |
| CSV to JSON here, then a local serializer | Working conversion today, with coercion rules that match this page's documented rules | Two steps instead of one, and the second step needs a local tool |
| yq or another command-line tool | Scriptable, repeatable, no browser | Install and terminal comfort; overkill for a one-off private file |
| Hand-writing the YAML | Zero tools, and you learn the shape | Error-prone past a dozen rows |
Accuracy and limits
The documented boundaries of the method, each verified against the pipeline code:
- The page does not convert (as shipped): the output echoes the input under a note promising a live converter that is not on the page. This is the shipped behavior, stated here rather than glossed over.
- Comma is the only delimiter, with no selector on this page. Semicolon- or tab-separated files parse as one fat column; the TSV to JSON sibling handles tab-separated input as JSON, which then serializes to YAML locally.
- The coercion trades text for type: 02134 becomes 2134, and 1e5 stays a string because the number pattern does not match exponent notation. Quote such values after conversion when the distinction matters.
- Very large integers coerce through JavaScript numbers in the pipeline and can lose digits beyond the safe integer range (2^53); treat such columns as strings.
- Empty cells become empty strings (''), not nulls; edit them after conversion when the target system wants nulls.
- Hand-edits are where YAML breaks: keep 2-space indentation and never mix in tabs. The dump itself never emits tabs, so the machine-generated output starts valid.
Who converts CSV to YAML
DevOps engineers turning inventory CSVs into Ansible-style or Kubernetes-style manifests, developers seeding YAML fixture files from spreadsheet data, and data teams handing table-shaped exports to config-driven systems. The destination wants YAML, the source is a spreadsheet, and the bridge is a mechanical mapping, which is what the method above documents. None of those jobs needs an upload, which is why this family of pages keeps the conversion local even where, as here, the wiring is still pending.
Privacy, scoped honestly
The privacy claim on this family of pages is structural, and it holds even for a stubbed conversion: nothing you paste leaves the tab, because the page makes no network request at any point. The conversion pipeline that will eventually run here is a local parse plus a local dump, and the YAML library in that pipeline loads on demand, only when the tool is used. Until then, the honest statement is smaller but still true: nothing uploads, nothing is stored, and closing the tab clears everything.
Frequently asked questions
What does the page do today, exactly?
It echoes your CSV. The output panel fills with your input text unchanged, under a note that reads "CSV → JSON → YAML runs in the live converter below"; no converter renders below it, and the gap is logged as a bug on this site. The method and the working routes are documented on this page.
Does the tool handle quoted CSV fields?
The parser in the pipeline is a character-by-character RFC 4180 state machine: quoted fields, doubled quotes, and embedded commas or newlines all come through intact, so a cell like "Smith, John" stays one value. On the page as shipped, the transform routes to a passthrough, so neither the parse nor the dump runs there yet; the rules here describe what the real pipeline does.
Why did strings like "42" turn into numbers?
Deliberate coercion in the pipeline: a cell matching a plain numeric pattern becomes a number, so 30 lands as the YAML scalar 30. The flip side is the leading-zero trap, 02134 becoming 2134, so quote those values in the output when the zero matters.
What delimiter does the converter expect?
The comma, RFC 4180's standard case, and there is no delimiter selector on this page. Tab-separated input parses as one fat column here; the TSV to JSON sibling handles that shape as JSON first, and its output serializes to YAML with any local YAML library.
Is the CSV to YAML free to use?
Completely free, and deliberately so: the page asks for no signup and meters nothing. It runs in your browser, so each extra use costs this site nothing and costs you nothing either. Reload as often as the job requires.
Is the generated YAML indented with spaces or tabs?
Spaces, 2 of them, in the pipeline's dump options. YAML forbids tabs in indentation, and the dumper never emits them; keep using spaces at the same depths if you hand-edit the output afterwards.
Does CSV to YAML send my files to a server?
No. The page runs no conversion and makes no network request at all: your paste stays in the tab, nothing is transmitted, and the page keeps working offline after loading.
Can I convert YAML back to CSV?
Not on this site in the current build. The sibling YAML to CSV page ships the same unwired state: its transform also passes text through, so the reverse direction is equally dormant. For a working reverse trip, a local yq pass or the YAML library in your language of choice handles it in one line.
What happens to empty cells?
They become empty strings in the YAML record, visible as '', rather than nulls. If a missing value should be null in your downstream system, edit that field after conversion; the pipeline does not guess.
Sources and further reading
The method documentation above leans on the CSV specification (RFC 4180), the YAML 1.2 specification that defines the dump's block style and indentation rules, and the JSON specification for the middle stage of the pipeline. The XML and MDN references round out the collection's format family.
Sources and further reading
- RFC 4180: CSV format common definition(datatracker.ietf.org)
- RFC 8259: the JSON specification (IETF)(datatracker.ietf.org)
- YAML 1.2 specification(yaml.org)
- W3C XML specification(w3.org)
- MDN: Working with JSON(developer.mozilla.org)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.