CSV ↔ JSON Converter
Convert CSV with headers to JSON or flat JSON objects to properly escaped CSV.
How to use CSV ↔ JSON Converter
CSV input uses a comma delimiter and a first header row. Quoted commas, escaped quotes, multiline fields and CRLF or LF line endings are supported. CSV fields remain strings.
Details and limits
JSON input must be a nonempty array of flat objects. Headers combine all property names; missing values and null become empty fields. Nested data is rejected. Output preserves cell text, including spreadsheet formula prefixes; review untrusted CSV before opening it in spreadsheet software. Input is limited to 200,000 characters.
Practical example
CSV needs a header row; JSON input needs a nonempty array of flat objects. Text such as a code with leading zeros should stay a string.
With header name,score and row Ada,10, CSV conversion returns [{"name":"Ada","score":"10"}]. The score is a string, not the number 10.
Frequently asked questions
Why is a row rejected even though it looks like a table?
Each data row must have the same number of fields as the header. A comma inside a value needs quoting so it does not become another column.
Can two columns have the same header?
No. Headers must be nonempty and unique, otherwise converting them to object keys would lose a distinct column.
What happens to an identifier such as 00123?
CSV fields become strings, so the leading zeros are retained. Keep the identifier quoted in JSON too if you later convert it back.