A CSV file stores records in rows and separates fields with commas. To make JSON objects, a converter uses the first row as headers and maps each later row to an object. Try theMyJSONPal CSV to JSON converter: paste comma-separated text or drop a .csv file, then review the generated array before using it elsewhere.
Headers become keys; records become objects
name,active,score
Ari,true,98.5
Bea,false,91Each data row becomes an object in a JSON array:
[
{ "name": "Ari", "active": true, "score": 98.5 },
{ "name": "Bea", "active": false, "score": 91 }
]The first row is always treated as headers, not as a record. Make sure it contains the field names you want, and that subsequent rows keep the same column order.
Quote fields that contain CSV punctuation
A field containing a comma, newline, or quote must be enclosed in double quotes. A quote inside a quoted field is represented by two double quotes:
name,note
"Chen, Morgan","Said ""check the export"""The CSV parser supports quoted fields, embedded commas and line breaks, doubled quotes, and CRLF line endings. Quoted cells remain strings, so a value such as "00123" keeps its leading zeroes. Unquoted values that look like numbers become numbers; unquotedtrue or false become booleans, and empty cells becomenull.
Check headers and row widths
Each following row is mapped to the headers by column position. If a data row has fewer cells, the missing values become null. Keep each row aligned with the header order, and use distinct, meaningful header names: repeated headers map to the same JSON property and later cells can replace earlier ones. Fields beyond the header count are not represented in the output object.
CSV does not define nested objects or arrays. If a cell contains JSON text, the converter treats it as a string; it does not automatically parse it into a nested JSON value. Normalize your source when your target API requires richer structure than rows and scalar cells.
Convert and verify
- Check that the first row contains the desired property names.
- Confirm commas, quotes, and newlines inside fields are escaped correctly.
- Convert with CSV to JSON and inspect number, boolean, and empty-cell values.
- Validate the result against the receiving API or a JSON Schema when one is available.
- If you need to return the records to a spreadsheet, use JSON to CSV.
Conversion runs in the browser. Still review the output before importing it into a production system.