All tools · Utilities

CSV ↔ JSON

Convert CSV to JSON and back.

Free to use, no sign-up required. CSV ↔ JSON is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Converts CSV tables into JSON arrays of objects and JSON back into CSV, for moving data between spreadsheets, APIs and code.

How to use CSV ↔ JSON

  1. Choose CSV → JSON or JSON → CSV, or use Upload file; a .csv or .json file sets the direction for you.
  2. Paste or edit the data in the box.
  3. Check the output, then Copy result or Download it as converted.json or converted.csv.

How it works

CSV → JSON reads the first row as headers and turns each later row into an object. Quoted fields may contain commas, line breaks and doubled quotes, blank lines are skipped, and values are trimmed and kept as text. JSON → CSV needs an array of objects; the columns are every key found in any object, missing values become empty, and cells containing commas, quotes or line breaks are quoted.

Example

The CSV “name,age,city” with the row “Ada,36,"London, UK"” becomes [{"name": "Ada", "age": "36", "city": "London, UK"}]. Converting [{"name":"Ada","age":36},{"name":"Alan","city":"Wilmslow"}] back gives the header name,age,city with rows Ada,36, and Alan,,Wilmslow.

Questions about CSV ↔ JSON

Why are my numbers in quotes in the JSON?

CSV has no data types, so every cell is text. The tool keeps them as strings rather than guessing; convert fields to numbers in your code where you need them.

Can I convert nested JSON to CSV?

A nested object or array is written into its cell as JSON text, so {"a":1} stays readable but is not split into columns. Flatten nested fields into their own keys first if you want one column each.

Use it from chat

You do not have to open CSV ↔ JSON to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools