Client-side data tool

CSV to JSON Converter — Paste or Upload CSV/TSV and Download JSON

Paste CSV or TSV, preview the parsed rows, and convert to JSON without uploading data to a server.

Files up to about 10 MB are recommended.

Preview area


        

One-line tool description

Convert CSV or TSV text/files to clean JSON in your browser — paste data or upload a .csv, choose delimiter and header options, preview results, then download or copy the JSON. Client-side only; no files are uploaded to a server.

3-step quick use

  1. Paste your CSV text or choose a .csv/.tsv file to upload.
  2. Confirm delimiter (comma, tab, semicolon) and header settings; preview the first rows.
  3. Export: download a .json file or copy the JSON to clipboard.

How it works (principles and formulas — sources cited)

FAQ

Will the tool handle fields that contain commas, quotes, or newlines?

Yes — the parser follows RFC 4180 quoting rules: double-quoted fields may contain commas and CR/LF, and quotes inside fields are escaped by doubling (""). If your CSV follows RFC 4180 quoting, those values will parse correctly. (RFC 4180)

What delimiters are supported and how does autodetect work?

Supported delimiters: comma (,), tab (\t), semicolon (;). Autodetect tests multiple delimiters over the first K = 20 lines and chooses the one with the most consistent column counts (highest mode, lowest variance). You can override the selection manually.

My rows have different numbers of columns — what happens?

Default (Lenient): rows with missing fields are padded with null; rows with extra fields create additional columns named _extra1, _extra2... and the tool shows validation warnings listing affected row numbers. You can choose Strict mode to abort on mismatches.

Is my file uploaded to a server?

No. The conversion runs entirely in your browser (FileReader). The tool reads the file locally and does not send file contents to any server. Note: readAsText loads the whole file into memory — for practical stability the tool recommends files around or below ~10 MB. (MDN FileReader.readAsText)

Can I produce nested JSON grouped by a column?

Yes. Select a group-by column to generate either a key→array map or an ordered array-of-groups. Grouping is one-level (rows grouped by the chosen key); the group column can be retained or removed from child objects depending on your preference.

Will empty strings be converted to null or will numeric text be converted to numbers?

By default values are left as strings. You can toggle "convert empty to null". Automatic type coercion (numbers/booleans) is opt-in and follows deterministic rules (numeric regex and case-insensitive booleans) to avoid accidental conversions.

How many rows are previewed and can I change it?

Default preview = 10 rows (configurable). Autodetect uses K = 20 lines to select delimiter reliably before showing a preview.

What if the file is very large or causes the browser to hang?

FileReader.readAsText loads the full file into memory and may crash or hang the tab with very large files. The tool recommends staying near/under ~10 MB. For larger datasets a chunked/streaming approach is safer (future enhancement).