Convert JSON, CSV, XML and YAML online

Turn a data file into another format: JSON to CSV, CSV to JSON, XML to JSON, YAML to JSON and every other direction. The source format is detected for you.

Drop your files here

or choose files from your device

Up to 10 files, 20 MB in total. Accepted: JSON, CSV, TSV, XML, YAML, YML, TXT.

A JSON to CSV converter for data in four formats

A JSON to CSV converter is a tool you rarely need, but then you need it quickly: an export from an interface has to go into a spreadsheet, or a table from Excel has to become JSON for a developer. This page does both and more. Upload a file, choose the target format and download the result. JSON, CSV, XML and YAML can be converted in every direction, and the source format is detected from the file name and the content.

As a JSON to CSV converter it flattens nested objects into columns such as address.city, combines the columns of all records and quotes fields correctly, so commas, semicolons and line breaks inside a value do not break the table. You choose the separator, and an optional byte order mark makes Excel show umlauts correctly. In the other direction every CSV row becomes an object, and you decide whether numbers and true/false stay text or are detected. Leading zeros and very long numbers always stay intact.

XML and YAML work in the same way. Attributes of XML elements appear with the prefix @_, repeated elements become lists, and invalid element names are cleaned up when XML is written. YAML anchors are resolved, and files with an excessive number of aliases are refused. XML with a document type declaration is rejected, which rules out external entities and expansion attacks. The JSON to CSV converter also tidies JSON, because converting JSON to JSON simply formats it.

Everything is processed on our own servers in Germany, held in memory only and deleted after the download, at the latest after an hour. No file name or content is logged. The same JSON to CSV converter is available through the API, so you can build it into scripts and automations. The free daily conversions of the JSON to CSV converter need no account.

How it works

  1. Add your data files

    Drop up to 10 .json, .csv, .xml or .yaml files onto the page or choose them from your device.

  2. Choose the target format

    Pick JSON, CSV, XML or YAML. Separator, number detection and indentation are optional settings.

  3. Download the result

    Each file is converted on our server. Download it or, for several files, take the ZIP archive.

Questions and answers

How are nested objects and lists written to CSV?

Nested values become their own columns with a dotted name, for example address.city or tags.0. The columns of all records are combined, and a cell stays empty where a record has no value.

Do numbers stay numbers?

By default, values from CSV and XML stay text, so postcodes with a leading zero and long numbers keep their exact form. Switch “Values from CSV and XML” to detect numbers and true/false if you want typed JSON.

What happens to very large numbers in JSON?

Whole numbers with more than 15 digits would lose digits as normal numbers. They are kept as text instead, so IDs are never changed silently.

How are XML attributes and repeated elements converted?

Attributes appear with the prefix @_ and text next to attributes as #text. Elements that repeat become a list. When you write XML, names that are not valid are cleaned up, for example spaces become underscores.

Which CSV separators and character sets are supported?

Comma, semicolon, tab and pipe, detected automatically. Files are read as UTF-8, or as Windows-1252 if they are not valid UTF-8. The result is always UTF-8. For other character sets use the encoding tool.

Can I just format a JSON file?

Yes. Choose JSON as source and target and the file is rewritten with clean indentation.

Which files are refused?

XML with a document type declaration or entities, YAML with an excessive number of aliases, files that are not valid, and files larger than 20 MB in total.