csv-json-converter

Convert CSV to JSON, or JSON back to CSV, right in your browser. Quoted fields, commas and newlines embedded inside quotes, and doubled-up "" escaped quotes are all handled by a real character-by-character parser — not a split(',') that breaks on the first edge case. Comma, semicolon, and tab delimiters are all supported.

client-side only RFC 4180 parsing comma / semicolon / tab

// csv → json

input.csv
output.json
Result appears here.

// json → csv

input.json
output.csv
Result appears here.

// why not just split(',')

Real-world CSV allows a field to contain the delimiter, a quote character, or a newline — as long as the whole field is wrapped in double quotes ("New York, NY"), and a literal quote inside a quoted field is written as two quotes in a row ("she said ""hi"""she said "hi"). A regex or a plain split(',') has no notion of "inside a quoted field," so it silently splits on commas that were never meant to be delimiters. This tool instead walks the text character by character, tracking whether it's currently inside a quoted field, which is the only way to get all of that right — including a field that spans multiple lines because it's quoted.

// json → csv with mismatched keys

JSON objects in an array don't have to share identical keys — one record might be missing a field another one has. The header row here is the union of every key seen across all objects, in the order each key first appears; any object missing a given key just gets an empty cell in that column instead of the conversion failing.

// picking a delimiter