Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Convert CSV data (with headers) into a JSON array of objects.
[
{
"name": "John",
"city": "New York"
},
{
"name": "Jane",
"city": "Boston"
}
]This tool converts CSV (comma-separated values) data -- commonly exported from a spreadsheet -- into a JSON array of objects, using the first row as field names. It correctly handles quoted fields containing embedded commas or escaped quotes, not just a naive split-on-comma.
Paste CSV data with a header row. Each subsequent row becomes one JSON object, keyed by the header row's column names.
The parser reads character-by-character, tracking whether it's inside a quoted field (where commas and newlines don't end the field) versus outside one, correctly handling the standard CSV quoting rules including doubled quotes ("") as an escaped literal quote.
name,city
"Doe, John",New York converts to [{"name": "Doe, John", "city": "New York"}] -- the comma inside the quoted name doesn't split into an extra column.
To go the other direction, see the JSON to CSV Converter. To convert between different delimiter characters, use the CSV Delimiter Converter.
The most important thing to know about the output is that every field is a JSON string. A cell containing 42 becomes "42" in quotes, a cell containing true becomes "true", and an empty cell becomes an empty string rather than null. The converter does not guess data types. This is safe because it never changes a value such as a postcode with a leading zero or a long identifier that would lose precision as a number. The trade-off is that if your code expects real numbers or booleans, you will need to convert them afterward, for example by mapping over the array and parsing the fields you know are numeric.
Consider hypothetical input with the header row id,item,note and two data rows. The first is 1,Pen,"Blue, fine tip" and the second is 2,Notebook with only two values. The first object gets a note of "Blue, fine tip", keeping the internal comma because the field was quoted. The second object gets an empty string for note, since the row ran out of values. In the opposite situation, where a row has more values than the header has names, the extra values are ignored because there is no header to attach them to. If you see data silently missing, compare the count of header names with a data row that seems too long.
Windows-style line breaks are normalized, so files from Excel work the same as ones from Unix tools. Completely empty lines are dropped rather than becoming empty objects. A quoted field can span several lines, and the line breaks inside it are kept in the resulting string, shown in JSON as an escaped newline.
Count the objects in the output and compare against the number of data rows in your source; a mismatch usually points to an unclosed quote that has swallowed following rows into one field. Look at the first object to confirm the key names are what you expect, particularly if the header row was exported with a hidden byte order mark or extra whitespace. For very large files, a browser tool may become slow, so consider a script or a command line utility for datasets with hundreds of thousands of rows.
After conversion you can paste the array into a mock API, a seed script or a test fixture. If your target system requires numbers, dates or nested objects, treat this tool's output as the raw starting point and reshape it in your own code, where the type rules for your data are known.
Yes -- a field wrapped in double quotes can contain commas, newlines, or escaped quotes ("") without breaking the column structure, matching the standard CSV specification.
Use the CSV Delimiter Converter first to convert to commas, or check whether your data source can export as comma-delimited directly.
Missing trailing fields become empty strings in the resulting JSON object, rather than causing an error.
The converter keeps every field as a string and does not guess types. Convert numeric or boolean fields in your own code if you need real numbers.
The extra values are ignored, since there is no header name to attach them to. Rows with fewer values get empty strings for the missing fields.
Only one survives. The later column overwrites the earlier one in every object, so rename duplicates before converting.
Not directly. The first row is always used as field names, so add a header line first.
Reference: MDN Web Docs