TonySkill

Data converter

Convert your data between CSV, JSON, XML and YAML in any direction. Format detected automatically, errors pinpointed, table preview. Everything runs in your browser.

Accepted: JSON, CSV, TSV, XML, YAML, YML, TXT, GEOJSON, JSONC, TAB, RSS, ATOM, KML, GPX, XSD, PLIST · Max 50 MB per file

Processed on your device. Only tools that say so send a file to our server.

Tip: paste text anywhere on the page (Ctrl+V).

How to convert data

  1. Drop a CSV, JSON, XML or YAML file, or paste its content: the format is detected.

  2. Pick the target format; the result updates as you edit the input.

  3. Copy or download the result. The ⇄ button starts again from the result for another conversion.

Why use this tool

Four formats, every direction
CSV (comma, semicolon, tab), JSON, XML and YAML. The input format is detected and the result updates with every keystroke.
Errors explained
A missing comma, a badly closed tag, wrong indentation: the line and column are shown, the line is highlighted and “Go to error” puts the cursor there.
Useful settings
CSV headers and delimiter, number detection, indentation, key sorting, XML element names, Excel-friendly CSV. Table preview of the first 100 rows.
Nothing leaves your device
The conversion runs in your browser: your data is never sent to a server, even 50 MB files.

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

  1. 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).
  2. Check the detected format, shown in the source selector, or choose it yourself if the detection is wrong.
  3. 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.
  4. Copy or download. The downloaded file takes the extension of the target format.

What happens in each direction

From → toResult
CSV → JSONOne object per row, keys from the first row; numbers and booleans recognised; see CSV to JSON
JSON → CSVA 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 YAMLThe structure is kept; for XML you can name the root element (root by default) and the list item (item by default)
XML → JSONElements become keys; see XML to JSON for details
YAML → JSONYAML 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.

Something wrong with this tool?

More data tools

  • CSV to JSONEach CSV row becomes a JSON object keyed by the headers. Delimiter detected, numbers and booleans recognised.FreeNo sign-up
  • JSON to CSVA list of JSON objects becomes a CSV table ready for Excel. Nested objects are flattened into columns.FreeNo sign-up
  • XML to JSONTurn an XML document into readable JSON: attributes prefixed with @, repeated elements grouped into arrays.FreeNo sign-up
  • JSON to XMLProduce well-formed XML from JSON. Root and item names adjustable, keys fixed up when needed.FreeNo sign-up
  • CSV editorOpen a CSV in a real spreadsheet: delimiter detected, accents kept, save as CSV or Excel.FreeNo sign-up
  • CSV to XLSXOpen a CSV in Excel without broken accents or columns.FreeNo sign-up