Skip to content
migration.tools
CSV to JSON

CSV to JSON converter

Turn a spreadsheet export into a JSON array your code can use. Each row becomes an object keyed by the header row, with numbers and booleans typed correctly and IDs with leading zeros left alone.

Going the other way? JSON to CSV

Options

CSV

JSON

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your CSV or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the JSON or download it. Drop several files to convert a batch into one ZIP.

How CSV becomes JSON

Every row in the CSV input becomes one record in the JSON output, and the header row supplies the field names. Column order is preserved.

Cells are typed where the meaning is unambiguous: 42 and 3.14 become numbers, true and false become booleans, and an empty cell becomes null. Anything that only looks numeric — 00501, +44 20 7946 0958, a 19-digit order ID — stays a string, because turning it into a number would corrupt it.

Dotted headers such as address.city can be expanded into nested objects with the “Nest dotted headers” option, which is how most APIs and document databases expect related fields to arrive.

CSV and JSON, briefly

CSV is the lowest common denominator for tabular data: every spreadsheet, database and import wizard reads it. It has no types and no nesting, and details such as the delimiter, quoting and encoding vary between programs.

JSON is the default language of web APIs and document databases. It nests objects and arrays to any depth and distinguishes strings, numbers, booleans and null, but has no comments and no date type.

Questions

Which CSV dialects are supported?

Comma, semicolon, tab and pipe delimiters are detected automatically. Quoted fields, escaped quotes (""), line breaks inside quotes and a UTF-8 byte-order mark are all handled. If your file has no header row, switch that option off and columns are named column_1, column_2, and so on.

Does the converter guess data types?

Yes, unless you turn it off. Whole numbers, decimals, true and false become real JSON numbers and booleans. Values with leading zeros (like ZIP code 00501), numbers longer than 15 digits and anything that isn't unambiguously numeric stay as strings, so IDs and phone numbers survive intact.

Guides that use this tool