To convert data between CSV, JSON, XML and YAML, drop a file or paste its content above: the source format is detected automatically, you pick the target format, and the result updates as you edit. If the input is invalid, the line and column of the error are shown and the line is highlighted. Copy the result or download it as a file; the ⇄ button restarts from the result for another conversion. Everything runs in your browser, up to 50 MB, and nothing is uploaded.
Step by step
- Drop a file or paste text. The page accepts json, csv, tsv, xml, yaml, yml and txt files, and a few variants of these formats (for example geojson, rss, atom, kml, gpx).
- Check the detected format, shown in the source selector, or choose it yourself if the detection is wrong.
- Pick the target format: JSON by default, or CSV, XML or YAML. The result is rebuilt each time you change the input or a setting.
- Copy or download. The downloaded file takes the extension of the target format.
What happens in each direction
| From → to | Result |
|---|---|
| CSV → JSON | One object per row, keys from the first row; numbers and booleans recognised; see CSV to JSON |
| JSON → CSV | A table: nested objects are flattened into columns named with a dot (address.city) and lists with their position (tags.0). The columns are the union of the keys of all items |
| JSON → XML or YAML | The structure is kept; for XML you can name the root element (root by default) and the list item (item by default) |
| XML → JSON | Elements become keys; see XML to JSON for details |
| YAML → JSON | YAML parsed and written as JSON, with 2 or 4 spaces, tabs or minified output |
For CSV output you can pick the delimiter and tick “Excel-friendly (BOM)”, which adds the byte-order mark so that Excel opens accents correctly. For JSON and YAML you can sort the keys.
Understanding an error
When the text cannot be read, the tool tells you what is wrong in plain words (a missing comma, an unclosed string, a trailing comma, a comment in JSON, single quotes instead of double quotes, a key without quotes…), shows the line and column, and “Go to error” puts the cursor there. To only check a file, use the JSON validator or the YAML validator; to tidy it, the JSON formatter.
Common cases
- A spreadsheet export to an API: CSV → JSON, then check the first rows in the table preview (100 rows at most).
- An API answer to a spreadsheet: JSON → CSV with the Excel-friendly option, then open it in the online spreadsheet.
- A configuration file: JSON ↔ YAML, with JSON to YAML for that direction only.
Limits and privacy
- Size: 50 MB at most. Above 1,000,000 characters the boxes only show an extract and the full file stays available to download.
- Privacy: the conversion runs in your browser, your data is never sent to a server.