Skip to content

CSV to JSON Converter - Convert CSV to JSON Online

Switch to JSON → CSV
Input CSV
JSON Output

Convert CSV to JSON

Paste CSV on the left and a JSON array appears on the right, one object per row, keyed by the header row. The delimiter is detected automatically, quoted fields are parsed per RFC 4180, and everything runs in your browser, so customer exports and other private files never leave your machine.

Example

A semicolon-separated export like this:

id;name;price;zip
1;"Smith, Jo";1.50;02134
2;Ann;12;

with "Detect numbers, booleans and null" on, becomes:

[
  { "id": 1, "name": "Smith, Jo", "price": 1.5, "zip": "02134" },
  { "id": 2, "name": "Ann", "price": 12, "zip": "" }
]

The semicolon was detected from the header, the comma inside the quoted name did not split the field, the ZIP code kept its leading zero because it stayed a string, and the empty ZIP became an empty string. The real output is indented one key per line; it is shortened here.

Gotchas

  • Excel and leading zeros. If a ZIP code or product code was opened in Excel before being saved as CSV, the leading zero may already be gone. The converter cannot bring it back.
  • Values are not trimmed. Header names are trimmed, but cell values keep any spaces after the delimiter, so a, b gives " b".
  • Everything is flat. Each row becomes a flat object. Column names with dots, like address.city, stay as literal keys rather than becoming nested objects.

Going the other way? Use the JSON to CSV converter. To explore the result, paste it into the JSON tree viewer or query it with the JSON path finder.

Related Tools

Frequently Asked Questions

How are column headers handled?
The first row is always the header row, and each cell becomes a key. Empty header cells are named column1, column2 and so on by position, and repeated headers get a suffix (name, name_2) so a later column does not overwrite an earlier one. A UTF-8 byte-order mark, which Excel adds to its CSV exports, is removed so it does not end up in the first key.
Are numbers converted to JSON numbers?
Only if you tick "Detect numbers, booleans and null". Then 42 becomes 42, true becomes true and null becomes null. Values with leading zeros such as ZIP codes (02134) and phone numbers stay strings, and integers too big for JavaScript are kept exact. Note that 1.50 becomes 1.5 and 1e3 becomes 1000. Leave the option off if formatting matters. Empty cells are always empty strings, not null.
Can I convert semicolon or tab-separated files?
Yes. Auto-detect looks at the header row and picks whichever of comma, semicolon, tab or pipe appears most often outside quotes. European Excel exports with semicolons and TSV copied from a spreadsheet both work. You can also choose the delimiter yourself.
How are commas, quotes and line breaks inside values handled?
As in RFC 4180. A field wrapped in double quotes can contain the delimiter and line breaks, and a doubled quote ("") inside it stands for one quote. So "Smith, Jo" stays one value instead of being split in two.
What happens if rows have different numbers of columns?
A short row gets empty strings for the missing columns. Extra cells beyond the header count are dropped, so check the output if a row has an unquoted comma in it. Completely empty rows are skipped.