Home · Free tools · CSV to JSON

CSV to JSON

Paste a CSV, or drop a .csv or .xlsx file, and get JSON back — an array of objects by default, or an array of arrays, or one array per column. Numbers become numbers and true/false become booleans, while a reference number with a leading zero stays a string, because turning 00012345 into 12345 is a data loss you would not find until much later.

Or drop a file

Drop .csv, .tsv or .xlsx here to load it into the box below

CSV paste it here, or edit what the file loaded

Nothing is uploaded. The file is read by JavaScript in this tab and never leaves your computer — no server sees it, and closing the tab throws it away.

Typing values is where these converters differ

Every cell in a CSV is text. JSON has types. Deciding which text becomes a number is the entire interesting part of the conversion, and it is where a converter can quietly ruin your data.

  • A leading zero means it is not a number. 00012345 is an invoice number, a SKU or a zip code. Written as 12345 it no longer matches anything upstream. Here it stays a string: a value is only converted to a number when writing that number back out gives the original text character for character.
  • A thousands separator is not a number either. 8,600 is ambiguous — a separator in English, a decimal comma in German. Rather than guess, it stays a string, so you can see it and fix the source. What is unambiguous (8600, -12.5, 1.2e3) is typed.
  • Empty is null, not an empty string. A blank cell becomes null so that "no value" survives the round trip instead of turning into "", which most consumers treat as a value.

If you want none of that, turn off Type numbers and booleans and every value comes out as a string.

Three output shapes, for three different consumers

  • One object per row is what an API or a JavaScript program usually wants: [{"invoice_no":"00012345","amount":8600}, …].
  • Array of arrays keeps the header as the first row. It is compact, it preserves column order exactly, and it is what charting libraries and Google Sheets' API take.
  • One array per column{"invoice_no":[…],"amount":[…]} — is the shape dataframe libraries load fastest, and the one to pick when the columns are long and few.

Duplicate and empty headers

Two columns called amount would silently overwrite each other in an object, so the second becomes amount_2. A column with no header gets its spreadsheet letter (A, B, C) rather than an empty key.

Encodings, so the JSON is not mojibake

A CSV exported from a Japanese or Taiwanese system is often Shift-JIS or Big5, not UTF-8. Dropping the file here detects the encoding rather than assuming UTF-8, and everything written out is UTF-8 — which is the only encoding JSON is defined for.

Questions people ask

Why is my invoice number a string instead of a number?

Because it has a leading zero, or is longer than a JavaScript number can hold exactly. A value is typed as a number only when converting it back to text reproduces the original characters, so 00012345 and a 19-digit identifier stay strings. That is the behavior you want: the alternative loses the value silently.

Can I get every value as a string?

Yes — uncheck Type numbers and booleans. Blank cells still become null.

Can I convert an Excel file rather than a CSV?

Yes. Drop a .xlsx and pick the sheet; its rows are loaded into the box as CSV where you can trim them before converting. There is also a dedicated Excel to JSON page.

Are my files uploaded anywhere?

No. The file is read by JavaScript running in this tab, using the browser's own DecompressionStream to unzip .xlsx and a parser that runs on your machine. There is no server call in the page — you can watch the network tab while you use it. Close the tab and the data is gone.

Which delimiters are recognised?

Comma, semicolon, tab and pipe, detected from the first few lines — so a European export with semicolons converts without you setting anything.

Does it work with old .xls files?

Not directly. The .xls format is a different, binary format from Excel 97. Open it in Excel, LibreOffice or Numbers and save as .xlsx or .csv, then come back. The tool tells you this rather than failing silently.

Doing this every month?

TableDI 2 keeps it as a job — the files, the key columns, the tolerance and the fixes you made. Next month you drop in the new files and run it again.

macOS, Apple silicon and Intel; Windows is in progress. Free is not a trial — no account, no card.

Last reviewed 2026-09-15 by the TableDI team. Something wrong on this page? Tell us — it is one inbox, read by the people who build TableDI.