CSV ⇆ JSON Converter

Convert CSV to JSON, or JSON back to CSV.

What does this tool do?

CSV is the common export/import format for spreadsheets, while JSON is what most APIs and config files expect, and this tool converts between them in either direction. CSV to JSON reads the first row as column headers and produces an array of objects, one per row; JSON to CSV takes an array of objects (or a single object) and produces a header row plus one line per item, quoting any field that contains a comma, quote, or newline.

How to use this tool

Paste CSV or JSON into the input box and click the matching direction: CSV → JSON or JSON → CSV. If the JSON is a single object rather than an array, it's treated as one row. If a conversion fails, the error message explains why (invalid JSON, no rows found, etc). Everything runs locally in your browser; nothing is uploaded anywhere.

Common use cases

  • Converting a spreadsheet export into JSON to feed into an API or script.
  • Turning an API's JSON response into CSV for opening in Excel or Google Sheets.
  • Reshaping exported data before importing it into a different system.
  • Quickly inspecting a CSV file's structure by seeing it as an array of labeled objects.

Frequently asked questions

What happens to commas or quotes inside a CSV field?

Standard CSV quoting is supported: a field containing a comma, quote, or newline should be wrapped in double quotes, with any internal quotes doubled (""). This tool both reads and writes CSV using that convention.

What if my JSON objects have different fields?

When converting JSON to CSV, the header row is built from the union of every field found across all objects. Rows missing a particular field just get an empty value in that column.

Can I convert a single JSON object, not an array?

Yes. A single object is treated as one row and produces a header row plus one data row.