CSV to JSON converter
Paste CSV or open a .csv file and get a JSON array of objects or rows, with the delimiter detected for you.
Runs entirely in your browser
Paste CSV to begin.
Input up to about 10 MB, pasted or from a .csv or .tsv file. The result updates as you type.
How to convert CSV to JSON
- Paste your CSV into the box, or open a .csv file.
- Check the delimiter (it is detected automatically) and whether the first row holds the column names. Turn on number and true/false conversion if you want typed values.
- Copy the JSON or download it as a .json file.
From CSV rows to JSON
CSV is the lowest common denominator of data: every spreadsheet and database can export it. JSON is what most web APIs, scripts and configuration files expect. This tool reads the CSV with a parser that follows the CSV standard, so a comma inside a quoted address or a line break inside a quoted comment stays inside its cell instead of splitting the row.
With a header row, each line becomes an object whose keys are the column names, in column order. Without one, each line becomes an array. Values are kept as text unless you ask for numbers and true/false to be converted, because a CSV file carries no types and an automatic guess can quietly change a postcode like 02134 into the number 2134.
The line under the options tells you how many rows and columns were read and which delimiter was used. If some rows have more or fewer fields than the header, a note says which lines, which usually points at a stray delimiter or an unclosed quote in the source.
Tips
- Going the other way? Use JSON to CSV.
- To check or reformat the result, paste it into the JSON formatter.
- Clean repeated rows first with Remove duplicate lines.
Questions
Is my data uploaded?
No. The CSV is read and converted in your browser, and nothing is sent anywhere or stored. Closing the tab clears it.
Which CSV formats does it read?
Standard CSV as described in RFC 4180: fields separated by a delimiter, fields that contain the delimiter, quotes or line breaks wrapped in double quotes, and a quote inside a quoted field written twice (""). Windows (CRLF), Unix (LF) and old Mac (CR) line endings all work, and a byte-order mark at the start is ignored. Comma, semicolon, tab and pipe delimiters are supported.
How is the delimiter detected?
The tool tries comma, semicolon, tab and pipe on the first lines and picks the one that splits most lines into the same number of fields. Files saved by Excel in many European locales use semicolons, which is why this matters. If the guess is wrong, pick the delimiter yourself.
Why are my numbers in quotes?
By default every value stays text, exactly as written in the CSV, because CSV has no types and guessing can damage data such as ZIP codes or IDs. Turn on Convert numbers, true/false and null to get typed values. Even then, values with a leading zero (007) and numbers longer than 15 digits stay text so they are not changed or rounded.
What happens with repeated or empty column names, or uneven rows?
Empty column names become column_1, column_2 and so on, and a repeated name gets _2, _3 added, so no value overwrites another. Rows with fewer fields than the header get empty values; rows with more get extra column_N keys. Both are reported above the result so you can check the source.
Can I get arrays instead of objects?
Yes. Turn off First row is the header and every row becomes an array of values, including the first.