CSV to JSON Converter
Convert CSV to JSON instantly in your browser.
What is CSV → JSON?
The CSV to JSON converter turns comma-separated tabular data into a JSON array of objects. The first row is treated as the header; every subsequent row becomes an object keyed by those headers.
How it works
The parser walks each line character-by-character, respecting double-quoted values and escaped quotes. After parsing, optional numeric coercion converts columns whose every cell parses as a number.
- Paste CSV or drop a file. Drag a .csv file onto the input or paste rows manually. Quoted values with embedded commas are supported.
- Choose output options. Toggle pretty-printing and the optional 'convert numeric strings to numbers' mode.
- Convert and copy or download. Click Convert to produce JSON. Copy to clipboard with one click or download as data.json.
Examples
name,age\nAlice,30\nBob,25
Produces [{name:'Alice',age:'30'},{name:'Bob',age:'25'}].
Quoted cells with commas
Cells like "Smith, John" are handled correctly without splitting on the comma inside the quotes.
Common mistakes
Forgetting to quote cells with commas
If a cell contains a comma but isn't quoted, the parser will treat it as two columns.
Mixing tabs and commas
CSV strictly uses commas. If your source uses tabs, convert to commas first.
Alternatives
Spreadsheet apps
Most spreadsheet apps can export CSV, but they typically require uploading your file.
Custom scripts
Node or Python libraries work but require a development environment.
Frequently asked questions
Is my CSV uploaded to a server?
No. The parser runs entirely in your browser using JavaScript — your data never leaves your device.
Does it support quoted commas and escaped quotes?
Yes. Cells wrapped in double quotes can contain commas, newlines, and escaped double quotes.
Can it detect numeric columns?
Yes. Enable the 'Convert numeric strings to numbers' option to coerce columns whose cells all parse as numbers — empty cells become 0.