Convert tables between CSV and JSON

For developers and analysts moving tables between tools, the CSV and JSON converter transforms rows without re-entering their values.

Exchange tabular data between CSV and a JSON array while keeping the rows and values structured. You get the result directly in your browser.

How to use

  1. Pick the conversion direction you need first, for example CSV to JSON, before you type or paste anything.
  2. Paste your table into the input box, or import a file saved as CSV, JSON, Markdown, XML or YAML.
  3. Run the conversion: the header row of the CSV supplies the keys used by every JSON object.
  4. Copy the output from the result box and paste it into your editor, script or import tool.

Example

A simple case: a short list of cities with a visit count, separated by commas. After conversion, each row should appear as an object whose keys are city and visits, and the header line should not survive as a data row.

Input

city,visits
Lyon,120
Nantes,80

Output

[
  {
    "city": "Lyon",
    "visits": "120"
  },
  {
    "city": "Nantes",
    "visits": "80"
  }
]

Limits and formats

Where processing happens

The whole conversion happens in your browser, including when you import a file. Nothing travels outside your device and no copy is kept once you leave the page.

Frequently asked questions

What happens to the first row of my CSV?

It is treated as the header, so its labels become the keys of each JSON object. If you would rather not have those keys, remove the header row or rename its labels before converting.

Can I convert JSON that contains nested objects?

Not reliably, because the converter works with flat rows and columns. Objects nested inside another object, or arrays used as values, have no direct column equivalent.

Do commas and quotes inside my values break the conversion?

Values wrapped in quotes can hold commas, as long as the CSV is escaped properly. Check the result, because imperfect escaping shifts columns and mixes fields together.

Tools in the same category