See a small, generic CSV converted into a JSON array of objects.
This tool converts a CSV table into a JSON array of objects (using the first row as field names), or converts a JSON array of flat objects back into CSV with a header row.
It is useful when you have exported data from a spreadsheet and need it as JSON for an API request or a config file, or the reverse — you have a JSON array from an API response and want to open it in a spreadsheet.
The CSV parser handles basic comma-separated values and quoted fields containing commas. It does not handle every edge case of the CSV spec (like quoted fields containing embedded newlines) — for those, a dedicated CSV library is more reliable.
Worked example: a CSV row like Alice,"Mumbai, India" converts correctly to {"name": "Alice", "city": "Mumbai, India"} — the comma inside the quoted city field doesn't split into an extra column, because the parser tracks whether it's currently inside a quoted field before treating a comma as a column separator. A naive split on every comma, without that quote-awareness, would incorrectly break "Mumbai, India" into two separate values.
Yes, fields wrapped in double quotes containing commas are handled correctly, following the common CSV convention.
JSON → CSV works best with flat objects. Nested objects or arrays inside a field will be stringified rather than expanded into columns.
Yes, CSV → JSON assumes the first row contains field names and uses them as the JSON object keys.