Skip to content

Convert CSV or TSV into JSON arrays or objects with header and type detection.

Loading tool

About CSV to JSON

Convert CSV or TSV into JSON as an array of objects, an array of arrays, or an object keyed by a column you choose. The delimiter (comma, semicolon, tab or pipe) is auto-detected, quoted fields with embedded delimiters, doubled quotes and line breaks are parsed per RFC 4180, and numbers, true/false and null can be converted to real JSON types. Long integers that would lose precision stay as strings, and rows with the wrong number of columns are reported with their line number.

Common uses

  • Turn a spreadsheet export into JSON fixtures or seed data
  • Load CSV data into a JavaScript app or API request
  • Build a lookup object keyed by ID from a CSV file
  • Find rows with missing or extra columns in a CSV file

FAQ

How are commas inside a value handled?
Per RFC 4180, a field that contains the delimiter, a quote or a line break must be wrapped in double quotes, and quotes inside it are doubled. Such fields are parsed as a single value.
Can I keep every value as a string?
Yes. Turn off type inference and every cell is written as a JSON string, which is useful for codes like ZIP codes or IDs where you want the exact text.
What if my CSV has no header row?
Turn off the header option and columns are named column1, column2 and so on.