Convert CSV, TSV or any delimited text to JSON with correct handling of quotes, commas and embedded newlines.
Ctrl + Enter to run
Converts a CSV file into an array of JSON objects using the header row as keys. Parsing follows RFC 4180, which matters more than it sounds: a field containing a comma must be quoted, a quote inside a quoted field is doubled, and a field may legally contain a newline.
That last point is why splitting a CSV on line breaks is unsafe and why naive converters shift every column after the first quoted field. Type handling is the other decision — numbers and booleans in a CSV are just text, so check whether you want them coerced or preserved as strings.