{jsonbody.com}

CSV to JSON

Convert CSV to a JSON array online. Auto-detects delimiters, handles quoted fields, converts numbers and booleans, and can rebuild nested objects. Free tool.

Turn CSV data into a JSON array

Spreadsheets, database exports and reports usually come as CSV, while web apps and APIs expect JSON. This converter uses the first row as field names and turns each following row into an object. The delimiter is detected automatically, so files that use commas, semicolons, tabs or pipes all work without any extra setup.

Paste your data or open a .csv file. The result appears as you type and can be copied or downloaded as a .json file.

Example with quotes and nesting

The second row has a comma inside quotes, and a doubled quote that represents a single quotation mark. Both follow RFC 4180. With Nest dotted headers turned on, the address.city column becomes a nested object.

CSV input and JSON output
id,name,active,address.city
1,Asha,true,Pune
2,"Das, Meera ""M""",false,Delhi

[
  { "id": 1, "name": "Asha", "active": true,
    "address": { "city": "Pune" } },
  { "id": 2, "name": "Das, Meera \"M\"", "active": false,
    "address": { "city": "Delhi" } }
]

Options explained

  • First row is a header: turn it off if your data has no column names, and generic names will be used instead.
  • Convert numbers and booleans: 42 and true become real JSON types. When off, everything stays a string.
  • Nest dotted headers: builds nested objects from column names such as a.b.
  • Delimiter: auto-detection normally works, but you can set it manually if a file gives a wrong result.

Values that should stay text

Type conversion is convenient, but not every string of digits is a number. Postal codes such as 011001 and phone numbers with a leading zero would lose information as numbers, so values with leading zeros are kept as strings. IDs too long for JavaScript to store exactly are also left as text, rather than being silently rounded. If a column must always remain text, turn the conversion option off.

Exporting clean CSV from Excel

Choose CSV UTF-8 when saving from Excel, so names in Hindi and other languages keep their characters. Some Excel exports begin with a hidden byte order mark, and you may see stray characters on the first column name if another tool does not handle it. Dates are saved in whatever format is displayed in the cell, so standardise them to a form like 2026-03-14 before export. Check for merged cells or summary rows too, because they turn into odd records in the output.

Frequently Asked Questions

Why did my data all end up in one field?

The delimiter was probably misdetected. Choose it manually from the Delimiter option.

Can a value contain line breaks?

Yes, if it is wrapped in double quotes. Quoted fields can contain commas, line breaks and escaped quotes.

What happens if rows have different numbers of columns?

Short rows get null for the missing cells. Extra cells go into generated columns such as column_3, so no data is dropped. Check your source file if you see these.

How do I go from JSON to CSV?

Press the swap button, or use our JSON to CSV Converter, which is the same tool with that direction selected first.