Skip to content

CSV to JSON and JSON to CSV

Convert spreadsheet data to JSON for your code, or JSON back to CSV for your spreadsheet.

Direction
Delimiter

Read 3 rows of 4 columns, split on commas, with the first row as keys.

Formats

CSV and JSON side by side

CSV (comma-separated values) is a plain-text table: one line per row, values separated by a delimiter. It is what spreadsheets export. JSON describes structured data with named fields, which is what code and APIs expect.

With a header row, each CSV line becomes one JSON object:

id,name + 1,Ada → [{ "id": 1, "name": "Ada" }]

Tips

  • Check the first row: header names become JSON keys, so short, unique names work best.
  • Keep IDs, phone numbers and postal codes with leading zeros as text (they stay strings automatically).
  • Opening a CSV in Excel can reformat dates and long numbers. Import it as text to be safe.

Frequently asked questions

How does the converter handle commas inside values?

Values in double quotes can contain the delimiter, line breaks and quotes (written as two quotes, ""), following the CSV standard RFC 4180. "Smith, Jo" stays one value.

Why are some values numbers and others strings?

With "Detect numbers and booleans" on, values that look exactly like JSON numbers, true, false or null become those types. Values with leading zeros, such as postal codes like 0123, stay strings so nothing is lost. Turn the option off to keep everything as strings.

My CSV from Excel uses semicolons. Does that work?

Yes. Excel in many European countries saves CSV with semicolons, because the comma is the decimal separator there. Auto-detection picks the delimiter from the first line, or you can choose it yourself.

What JSON can I convert to CSV?

An array of objects (each object becomes a row, and all keys become columns) or an array of arrays. Nested objects are written as JSON text inside the cell.