Why are numbers returned as strings?
CSV has no data types, so every value is text. Convert numbers and booleans in your code, because a column such as 007 should stay as text if it is a code.
Convert a CSV table with a header row into a JSON array of objects, or turn an array of objects back into CSV.
Runs in your browser — nothing is uploaded
CSV is the common exchange format for spreadsheets and databases, while JSON suits APIs and applications. Moving data between them means matching the header row to object keys and handling quotes, commas and line breaks inside fields.
Choose the direction. CSV input needs a header row, and each following row becomes one object. JSON input needs an array of objects, and the column list is the union of every key found. Quoted fields are parsed correctly.
CSV has no data types, so every value is text. Convert numbers and booleans in your code, because a column such as 007 should stay as text if it is a code.
Wrap the field in double quotes, as in "Austin, TX". A double quote inside a quoted field is written as two double quotes. The parser follows this standard.
Commas. For tab-separated files, replace tabs with commas first, or check that no field contains a comma before converting.
Common causes are a trailing comma, single quotes instead of double quotes, or a top-level object instead of an array. Fix the syntax first, then convert.
The CSV header includes every key found, and missing values are left blank. Check the header row to see which fields appeared.
No. Parsing and conversion run entirely in your browser, which is important for customer or payroll files.