Skip to content
Devtoolry

CSV to JSON

Convert CSV to a JSON array online with header detection, type inference and delimiter auto-detection. Turn spreadsheet exports into data for APIs and code.

Runs in your browser · Nothing uploadedFree · No sign-up

Something not working, or missing a feature? Send feedback

About the CSV to JSON

The CSV to JSON converter reads CSV or TSV exports and produces a JSON array. It detects the delimiter, can use the first row as keys, and can turn numbers and booleans into real JSON types.

Conversion happens in your browser, so your files and records stay private.

How to use the CSV to JSON

  1. Paste CSV or open a .csv file.
  2. Check the delimiter, header row and type inference options.
  3. Copy or download the JSON.

Example

Turn a spreadsheet export into typed JSON

Input

id,name,score,active,notes
1,Ada,98.5,true,"Likes ""quotes"", and commas"
2,Grace,87,false,

Result

[
  {
    "id": 1,
    "name": "Ada",
    "score": 98.5,
    "active": true,
    "notes": "Likes \"quotes\", and commas"
  },
  {
    "id": 2,
    "name": "Grace",
    "score": 87,
    "active": false,
    "notes": null
  }
]

The header row becomes the keys, numbers and booleans become real JSON types, and the quoted field keeps its comma and escaped quotes.

Common mistakes

  • Mixed types in one column. Type inference works cell by cell, so a column with 42 in one row and N/A in another gives a number and a string. Switch inference off if the consumer expects one type per column.
  • The wrong delimiter. Exports from European Excel often use semicolons. If every row comes out as one long key, choose the delimiter manually.
  • Duplicate header names. Two columns with the same header map to the same JSON key, so one value is lost. Rename one of them before converting.

Works well with the CSV to JSON

Frequently asked questions

What if my CSV has no header row?

Switch off "First row is header" and each row becomes an array of values instead of an object.

Are quoted fields with commas supported?

Yes. Quoted fields, escaped quotes and line breaks inside quotes are handled.

Are ZIP codes and long IDs kept?

Yes. Values that would change as numbers stay strings: codes with leading zeros such as 00123, and integers too large for JavaScript such as 64-bit IDs. Empty cells become null.

Does it handle TSV?

Yes. Tab-separated data is detected automatically, or choose tab as the delimiter.

How large a file can I convert?

Files of several megabytes convert in a few seconds in a modern browser, and nothing is uploaded.

Guides and tutorials