Modern Niche World MNW

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

  1. Paste CSV, or open a .csv, .tsv or .txt file of up to 10 MB.
  2. Check the line under the options: how many rows and columns were read, and which delimiter.
  3. Choose the output shape and format, and whether to detect numbers.
  4. 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.

Frequently asked questions

How does it find the delimiter?
It reads the first 50 rows with each of comma, semicolon, tab and pipe, and picks the one that splits the most rows into the same number of values. The line under the options says which it chose; if it guessed wrong, choose the delimiter yourself.
Why is 02134 still text, not a number?
A JSON number can’t start with a zero, and turning 02134 into 2134 would break a ZIP code, a product code or an ID. Values with a leading zero stay text, and the page tells you how many there were. Turn off type detection to keep every value as text.
Can it open Excel files?
No, it reads CSV text only. In Excel, Google Sheets, Numbers or LibreOffice, save or download the sheet as CSV (CSV UTF-8 in Excel keeps accented letters), then open that file here.
Is my data sent anywhere?
No. The conversion runs on this page, on your device, and nothing is sent, logged or saved, so it’s safe for exports with customer details, tokens or keys in them.