BlueCheddar

CSV to JSON converter

This CSV to JSON converter handles quoted fields, line breaks inside cells and the common delimiters, keeps long numbers exact and also converts back. It runs on your device, so a customer list stays there.

Direction

Nothing is uploaded or saved. Converting runs on this device.

How to convert CSV to JSON

  1. Paste your CSV, or open a file.
  2. Check the delimiter it found, and choose objects, arrays or JSON Lines.
  3. Copy the result or save it as a file.

Questions

Does it change long numbers or leading zeros?

No. A value such as 12345678901234567890 is written digit for digit, and the page counts such numbers, because a program that reads them as ordinary numbers may round them. A value with a leading zero, such as 00501, stays text. Turn off number detection to make every value text.

Which delimiters does it find?

Comma, semicolon, tab and pipe, from the first rows. The page says which one it used, and you can choose another. A file with one column reads as comma.

Can a cell hold commas, quotes or line breaks?

Yes, when the cell is in double quotes, as RFC 4180 describes, and a doubled quote inside it means one quote. If a quote never closes, the page refuses and says so, because the rest of the file would become one cell.

My CSV file is refused as not UTF-8. Why?

Some programs, Excel's plain CSV option among them, save in an older encoding. Choose it under File encoding, such as Windows-1252 for Western languages. The page does not guess, because a wrong guess gives wrong letters with no warning. A UTF-8 byte order mark is removed, so it never reaches the first column's name.

What happens to rows of different lengths?

No cell is dropped. Missing cells become null, extra cells get names such as column5, blank lines are skipped, and the page lists the first rows that differ. Blank or repeated column names get a new name.

How does JSON to CSV work?

It takes an array of objects, an array of arrays, one object or JSON Lines. Columns are every key found, in the order first seen. A nested value is written as JSON text in its cell, and null becomes an empty cell.

Is anything sent or saved?

No. It works on this page alone, with no request and no storage. You can check the page's requests yourself.