CSV to JSON Converter
CSV to JSON Converter turns the rows of a delimited file into JSON, using the same parser as CSV Viewer (delimiter guessed from the first line — comma, semicolon or tab).
How to use it
- Paste your CSV data into the input box
- Choose whether the first row is a header, and pretty or minified output
- Copy the generated JSON with one click
If you mark the first row as a header, the output is an array of objects keyed by that row; without a header it is an array of arrays. Every value comes out as a string — 42, true and blank cells are all quoted text, with no type guessing. An empty header becomes column_1, column_2 and so on; a repeated header gets _2, _3 appended; the risky keys __proto__, constructor and prototype are renamed. A row shorter than the header fills the missing keys with empty strings; a row with extra cells has them dropped. Choose two-space pretty output or a compact one. Input is capped at 2 MB, 50,000 rows and 250,000 cells, and the file is read in the browser.
FAQ
No. Every value is emitted as a JSON string, so 42 becomes "42" and true becomes "true". Cast the types yourself after conversion if you need them.
With a header row, an array of objects using the header names as keys. Without a header, an array of arrays, one inner array per row.
Missing trailing cells become empty strings; cells beyond the last header column are dropped. Empty or duplicate header names are renamed (column_2, name_2).