CSV to JSON
Paste CSV or open a file and get a JSON array, ready for code, test data or an API. The delimiter is found for you.
Paste CSV or open a .csv, .tsv or .txt file, up to 10 MB. It stays on this page: nothing is sent anywhere or saved.
Paste CSV above to see it as JSON.
Everything happens on this page, on your device: your data is never sent anywhere or saved.
Turn a CSV file into JSON
Spreadsheets and databases export CSV; web apps, test data and APIs usually want JSON. This tool reads CSV the way spreadsheet apps write it and gives you a JSON array, ready to paste into code or save as a file.
How to use it
- Paste CSV, or open a .csv, .tsv or .txt file of up to 10 MB.
- Check the line under the options: how many rows and columns were read, and which delimiter.
- Choose the output shape and format, and whether to detect numbers.
- Copy the JSON, or download it as a .json file.
The options
- Delimiter: found for you from the first 50 rows (comma, semicolon, tab or pipe), or chosen by you.
- Header row: the first row names the keys. Empty names become column1, column2 and so on, and a repeated name gets _2. Turned off, every row is data and the keys are column1, column2…
- Detect types: numbers become JSON numbers, true and false (in any capitals) become true and false, and null or an empty cell becomes null. Turned off, every value is a string.
- Array of objects gives one object per row; array of arrays keeps each row as a list, header first.
What counts as a number
Only numbers written the way JSON writes them, such as 42, -7, 3.5 or 6.02e23. A value with a leading zero, like the ZIP code 02134, stays text so the zero isn’t lost; so do 1,000, $5 and 3,50. Long numbers are written exactly as in the file, and the page warns you when JavaScript code reading the JSON would round them.
Tricky CSV
Quoted values can hold commas, line breaks and doubled quotes (""), as RFC 4180 describes. A row with fewer values than the header gets empty ones, and extra values get their own columns. The page tells you when that happens, and when a quote is never closed.
Good to know
- Dates and times stay text, exactly as written, and spaces around values are kept.
- It reads CSV, not .xlsx: save the sheet as CSV first.
- Nothing is sent anywhere or saved: the conversion runs on your device.
- Related tools: go the other way with JSON to CSV, check JSON with the JSON Formatter and Validator, or get tables out of a PDF with PDF Tables to CSV.