Input
Ready
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Input statistics are available via the Stats button above this field.
Output
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Output statistics are available via the Stats button above this field.
Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.
What the CSV to JSON Converter does
The CSV to JSON Converter reads CSV that has a header row and returns a JSON array with one object per row. Each header becomes a key exactly as written, and each cell becomes a string value, so nothing is renamed, split or nested.
It follows standard CSV quoting: a value in double quotes can contain commas, line breaks and doubled quotes (""). The separator is detected automatically, so comma-, semicolon- and tab-separated files all work, and empty lines are skipped.
When to use it
- Loading a spreadsheet export into a script, an API request or a document database such as MongoDB.
- Building test fixtures or seed data from a sheet that a colleague maintains.
- Checking what a CSV file really contains. Quoting problems are much easier to spot in JSON than in a spreadsheet.
- Preparing data for other formats: from JSON you can continue to the JSON to YAML Converter or the JSON to SQL (INSERT Statements) Converter.
Worked example
Input
first_name,city,zip
Ana,"Berlin, DE",10115
Ben,"Boston, US",02134
Output
[
{
"first_name": "Ana",
"city": "Berlin, DE",
"zip": "10115"
},
{
"first_name": "Ben",
"city": "Boston, US",
"zip": "02134"
}
]Common questions about the CSV to JSON Converter
Can I turn the JSON back into CSV?
Yes, with the JSON to CSV Converter. Because every row is a flat object, the same headers come back as columns and quoted values such as "Berlin, DE" stay in one cell.
Does a header like first_name become a nested object?
No. Every header stays one key, exactly as written, so first_name and address_city are ordinary keys. If you need nested objects, build them in your code from the flat keys.
What if some rows have more or fewer cells than the header?
The conversion still runs, but those rows will not line up with the columns. Check the file with the CSV Validator first: it reports rows with too many or too few fields, with the line number.