Format converter (CSV / JSON / YAML / XML)

Move tabular data between CSV, JSON, YAML and XML in either direction. Parsing and generation happen in your browser; no data is uploaded.

Input data

Waiting for input

Result

0 rows
The converted result appears here.

Choosing between CSV, JSON, YAML and XML

All four formats can carry the same tabular data, so the choice is about who or what will read it. CSV is the interchange format of spreadsheets: one header row, then one record per line. It is the smallest of the four and opens in Excel, but it has no types (everything is text), no nesting, and quoting rules that bite as soon as a value contains a comma, a quote or a newline.

JSON is the default for machines. It has real types — string, number, boolean, null, array, object — every language can parse it, and it is what APIs speak. It is verbose for large flat tables because the column names repeat on every row, and it tolerates no comments or trailing commas.

YAML is JSON’s data model written for humans: indentation instead of braces, no quoting for most strings, and comments allowed. That is why configuration files are written in it. The cost is that indentation is significant, which makes hand-editing large generated files error-prone, and a stray tab is a syntax error.

XML is the oldest and the most rigid. Elements and attributes can express nesting and mixed content, and a schema can validate the structure — which is why it survived in enterprise, Office documents and SOAP. It is the most verbose of the four and needs a real parser; regular expressions are not a substitute.

Conversion always passes through an array of objects: each CSV row (or each element under an XML root) becomes one object, and column names become keys. That is why type detection matters — 42, true and null become real values in JSON and YAML, while anything ambiguous stays a string. If a target format cannot express something the source had — nesting in CSV, comments in JSON — the information is flattened or dropped, so a round trip is not always lossless.

Parsing here is done on your device, which is the right place for it: exporting customer data or an internal configuration does not have to mean uploading it to someone else’s server first.

Frequently asked questions

How is a row of data represented internally?

Everything is converted through an array of objects: the CSV header row becomes the keys, and each element under the XML root becomes one row. Formats that cannot express nesting flatten to strings.

Why did my numbers come back as strings?

CSV and XML carry no type information, so values are inferred: text that looks like a number, boolean or null becomes that type in JSON and YAML, and anything ambiguous stays a string.

How large a file can I convert?

That depends on your device, since parsing happens in the browser. A few megabytes is comfortable; for very large exports, split the file first rather than pasting it all at once.