CSV to TSV, XML & YAML Converter

Convert CSV or TSV into TSV, XML or YAML, with the delimiter auto-detected and quoted fields containing commas or line breaks kept intact.

Rows and columns: sort, skip, limit, choose columns

CSV into TSV, XML or YAML

This converter turns CSV or TSV text into TSV, XML, or YAML right in your browser. Paste a spreadsheet export, a database dump, or an API response, choose an output format, then copy or download the result. Parsing follows RFC 4180, so quoted fields that contain commas, double quotes, or line breaks stay intact instead of splitting your rows apart, and the input delimiter — comma, semicolon, tab, pipe or caret — is detected automatically from the first line alone (the first line that is not a comment, when "Skip lines starting with" is set), or chosen from the Delimiter menu; a Quote character menu reads a file quoted with apostrophes.

Choosing a format

TSV re-delimits every row with tabs and re-quotes only the cells that actually contain a tab or newline, so the output round-trips cleanly. XML wraps each row in a <row> element inside a <rows> root — rename either in the Root element and Row element boxes — whose child tags come from the header cells, sanitized to valid XML names, with every value escaped; tick Start with the XML declaration to put <?xml version="1.0" encoding="UTF-8"?> on the first line. YAML emits a sequence of maps keyed by column name. A column name that repeats is written as name_2, name_3 and so on, so neither column is lost, and a column named with a whole number, such as 2024, comes first in every row, because JavaScript orders such keys ahead of the others. Each format’s row has an "Indent" select — for XML down to none, which puts everything on one line, and for YAML spaces only, since YAML forbids tabs — and YAML adds "Layout", to write each row on one line in flow style, and "Quotes": single (the default), double, or none, which writes a cell that reads back exactly as a number or true/false as that value while 007 and 1.50 stay strings. A "Skip lines starting with" box drops comment lines, such as those starting with #. The folded "Rows and columns: sort, skip, limit, choose columns" section shapes the table before it is written — "Sort by column number" as text or as numbers, either way, then "Skip rows", then "Keep at most rows", and "Keep only columns" by position or range — with a header row kept on top and never sorted, skipped or counted; once rows are shaped, the header checkbox shows for TSV too. Turn off the header option to treat every line as data: XML falls back to col1, col2 and so on, while YAML emits a plain list of lists. Everything runs locally, so even large or sensitive files never leave your device.

Frequently asked questions

How is this different from the delimiter converter and CSV to JSON tools?

The delimiter converter only swaps one separator for another, and CSV to JSON produces JSON. This tool fills the gap with three structured targets — TSV, XML, and YAML — parsing the input as RFC 4180 first so quoted commas and newlines survive.

Why do numbers appear quoted in the YAML output?

Cell values are kept as strings so identifiers such as 007, zip codes, and phone numbers are never reinterpreted as numbers. A value like 30 is therefore written as a quoted string, which preserves it exactly. Set Quotes to none to write numbers and true/false as values instead (age: 30); a cell becomes a value only when it reads back exactly as written, so 007, 1.50 and long IDs stay strings.

Can I name the XML elements, or read a semicolon or pipe file?

Yes. With XML chosen, the Root element and Row element boxes (rows and row until you change them) name the wrapper and each record — a name that is not a legal XML name is made into one, so my data becomes my_data — and Start with the XML declaration adds the <?xml …?> line. The Delimiter menu picks comma, semicolon, tab, pipe or caret instead of Auto-detect, and Quote character reads a file quoted with single quotes.

Can I change the indentation, or write each YAML row on one line?

Yes. An "Indent" select sets the spacing for XML, down to none on one line, and for YAML, in spaces only, since YAML forbids tabs. YAML’s "Layout" writes each row on one line in flow style.

Can I sort the rows, skip some, or keep only certain columns before converting?

Yes. Open “Rows and columns: sort, skip, limit, choose columns”. “Sort by column number” orders the rows by that column as text or as numbers, either way; “Skip rows” then leaves some out from the top, “Keep at most rows” stops after that many, and “Keep only columns” takes a list of positions and ranges. They apply in that order, as a query would, and a header row stays on top, never sorted, skipped or counted — which is why the header checkbox also shows for TSV while rows are shaped.