CSV to JSON converter
Convert a CSV table to a JSON array or a JavaScript constant. Optionally split a comma-separated column into an array.
Your data stays in this browser. Nothing is uploaded. Privacy details
1 Add your CSV
UTF-8 CSV, up to 5 MiB. Selecting a file replaces the input and converts it.
Include a header row. After editing the text, select Convert.
3 Preview and export
No result yetPreview limited to 30,000 characters. Copy and download include the complete output.
Convert CSV to JSON
- Choose a CSV file or paste text containing a header row.
- Choose JSON or JavaScript. Enable column splitting if a cell contains a comma-separated list.
- Select Convert, review the output, then copy or download it. Changing an output setting updates the result automatically.
Values stay strings, so IDs such as 001, dates, numbers, and formula-like text retain their text. Column splitting is optional and off initially. Trimming is on initially. Headers always receive unique, trimmed names, with a note when changed.
Split values use literal commas as separators. For CSV input, quote a cell containing commas, for example "name, date, status". Quotes inside that list do not create nested groups. If several headers match the split name when ignoring case, conversion stops so you can disambiguate them.
JavaScript output is a const declaration. Invalid variable names are adjusted with a visible note. Special property names such as __proto__ remain own data properties.
Privacy and limits
Files, pasted text, settings, and results remain in browser memory. The tool does not upload them, save them in browser storage, or include them in URLs. Clear all data cancels processing and clears the inputs and output. Only your theme preference is saved. Copy writes to the clipboard only when selected. See privacy and analytics.
Inputs allow 5 MiB of UTF-8 text, 20,000 data rows, 100 columns, and 500,000 cells including headers. Output allows 20 million characters. Quoted fields, doubled quotes, embedded line breaks, UTF-8 BOMs, and CR, LF, or CRLF record separators are supported. Blank physical lines are skipped. Quoted empty records and comma-only rows remain. Malformed quotes and uneven rows block export.
Hosted conversions use a local browser worker with a 20-second limit. Direct local-file use runs on the page and can briefly pause near the limits. Modern browsers with workers, TextEncoder, TextDecoder, File.arrayBuffer(), and Blob URLs are required. Clipboard access may require HTTPS or permission; downloads remain available if copying fails.