How to Convert CSV to JSON
How do I convert CSV to JSON?
Paste your CSV into a converter, confirm the first row is a header, pick the delimiter, and convert. Each row becomes an object with header keys, quoted fields are handled, and large files convert in a background worker with a capped preview.
The three steps
Open the CSV to JSON converter, paste your table or drop a .csv file, check First row is header, pick the delimiter or keep Auto, and press Convert. The JSON array appears on the right ready to copy or download. Nothing is uploaded.
Delimiter and quoted fields
CSV can use comma, semicolon, tab, or pipe. Auto detection picks the most likely one, and quoted fields that contain delimiters or newlines are handled per RFC 4180 so commas inside quotes stay in one cell. Switch delimiters if the header looks wrong.
Headers become keys
With First row is header on, the first row supplies the object keys. With it off, columns become column1, column2, and every row is data. Duplicate headers are flagged so you can fix them instead of silently losing a value.
Type inference versus strings
The converter can keep every value as a string or infer types: numbers become numbers, true and false become booleans, null becomes null. Choose strings when you need exact preservation, and types when the JSON will feed code that expects numbers and booleans.
Large files
Files above about 15 MB switch to a background worker. Measured on 8GB Win10, Node 24, V8 2240MB heap (median of 3, seed 42, 10 cols): 1K (94KB) 37.7ms, 10K (938KB) 41.3ms, 100K (9.4MB) 1,531ms, 500K (46.8MB) 5,553ms parse and 12,686ms pipeline. 1M rows (93.7MB) OOMs at 2GB heap, preview stays at 100K chars, download holds the full file. CSV → JSON is about 2.9× input size, so budget extra headroom.
What to do with the result
The output is a JSON array, so it can be piped straight into the JSON Validator, Formatter, or Diff. If the source CSV was ragged, the converter fails loudly with the exact line number instead of silently padding. For the numbers above, see the benchmark report in the repo at src/lib/csv/__benchmarks__/PERFORMANCE_REPORT.md.
FAQ
Does the conversion run locally?
Yes. Parsing and converting run entirely in your browser, in a background worker for large tables. Your CSV never leaves your machine.
Which delimiters are supported?
Comma, semicolon, tab, and pipe, with auto detection. Quoted fields that contain delimiters and newlines are handled correctly.
What happens to missing fields?
Rows with fewer fields get empty strings for the missing columns so the shape stays consistent. Ragged rows that would break the table fail with the line number.
Can I keep every value as a string?
Yes. Turn off type inference and every cell stays a string. With it on, numbers, booleans, and null are typed.