Convert CSV to JSON with delimiter detection, output mode selection (array of objects, array of arrays, or keyed by field), pretty-print toggle, and live preview. Handles quoted fields, escaped commas, and multi-line values.
Drop a CSV file or paste data. Select your delimiter (auto-detect, comma, tab, semicolon, pipe). Choose whether the first row is a header. Select output mode: Array of Objects (API-friendly), Array of Arrays (compact), or Keyed JSON (indexed by a specific column).
The converted JSON appears in the output panel in real time. Toggle Pretty Print for human-readable indented JSON, or compact mode for smaller file size. The output shows the total record count.
Click Copy to copy the JSON to your clipboard, or Download .json to save as a file. The downloaded filename matches your input CSV filename with .json extension.
Array of Objects: each row becomes an object using header row as keys. [{name:"Alice",age:30},{name:"Bob",age:25}]. Most common for APIs. Array of Arrays: each row is an array of values. [["Alice","30"],["Bob","25"]]. Compact, no key repetition. Keyed JSON: an object where each record is indexed by a chosen field value. {"alice":{name:"Alice",age:30}}. Useful for lookup tables.
RFC 4180 CSV standard allows values to be quoted with double-quotes, enabling commas within values: "Smith, John" parses as a single field "Smith, John". Double-double-quotes escape a literal quote: "He said ""hello""" parses as He said "hello". This tool uses PapaParse which fully implements RFC 4180, correctly handling quoted multi-line values and escaped quotes.
Empty CSV cells become empty strings ("") in JSON by default. You can optionally convert empty strings to null values, which is more semantically correct for JSON (representing absence of value). Null-safe option treats empty cells as JSON null rather than "".
If some rows have fewer columns than the header row, the missing values default to empty string or null. If some rows have more columns than the header, extra columns are ignored (or included as index-based keys). PapaParse handles these edge cases gracefully.
If you selected Array of Objects: const data = JSON.parse(jsonString); data.forEach(row => console.log(row.name)). If keyed: const lookup = JSON.parse(jsonString); console.log(lookup["alice"].email). JSON from this tool is immediately usable in JavaScript, Node.js, Python (json.loads()), or any language with JSON parsing.
PapaParse handles CSV files up to the browser memory limit — practically up to 50–100 MB reliably. Very large files (500k+ rows) may take a few seconds to parse. The JSON output of a large CSV can be significantly larger than the CSV input because keys are repeated for every record in Array of Objects mode.