Developer tool

CSV to JSON Converter

Convert CSV to JSON and JSON to CSV in your browser with delimiter detection, header support, number typing and nested flatten or unflatten.

Free, no sign-up. Runs in your browser; nothing is uploaded.

Options

Direction

Detected delimiter: ","

CSV

JSON

How to use the csv to json converter

Move data between spreadsheets and code

CSV is how spreadsheets and exports travel. JSON is how APIs and apps talk. This converter moves data between them in either direction without sending a byte to a server.

CSV to JSON

Paste CSV or open a file. If the first row holds column names, keep "First row is a header" on and you get an array of objects; turn it off to get an array of arrays. The delimiter is detected automatically (comma, semicolon, tab or pipe) and shown beneath the options, so European exports that use semicolons just work.

  • Convert numbers, true/false and null turns text like 42 or true into real JSON types.
  • Unflatten rebuilds structure from column names: address.city creates an address object and tags[0] and tags[1] create an array.

Quoted cells are handled properly, including commas, line breaks and doubled quotes inside them.

JSON to CSV

Paste an array of objects. The tool collects every key it finds into a header row, so objects with different fields still line up, with blanks where a value is missing. With flatten on, nested objects become dotted columns and arrays become indexed columns, which keeps the output usable in Excel or Google Sheets. Cells containing the delimiter, quotes or line breaks are quoted automatically.

Practical tips

  1. Check the delimiter if all your data lands in one column; the file probably uses semicolons or tabs.
  2. Mind leading zeros. Postcodes, phone numbers and IDs such as 0150 should stay strings, so leave number conversion off for those files.
  3. Use a UTF-8 file. A byte order mark at the start is removed for you.
  4. Large files convert quickly, but the textareas get slow beyond a few megabytes; split the file if the page feels sluggish.
  5. Download the result as .json or .csv with one click, or copy it to your clipboard.

Privacy

Your data is parsed and written by JavaScript in this tab. Nothing is stored or transmitted.

Frequently asked questions

How is the delimiter detected?

The tool tries comma, semicolon, tab and pipe on the first rows and picks the one that gives the most consistent column count. You can override it from the Delimiter menu.

How do quotes and line breaks inside cells work?

The parser follows the standard CSV rules: a cell in double quotes can contain commas and line breaks, and a doubled quote stands for one quote character.

What does unflatten do?

A header like address.city or tags[0] becomes a nested object or array in the JSON. The reverse option flattens nested JSON into those column names.

Why are my numbers still strings?

Number, true, false and null conversion is optional. Turn it on to get typed values. Leading zeros such as 0150 are kept as strings only when typing is off.

What JSON can be turned into CSV?

An array of objects is ideal. A single object becomes one row, and an array of arrays is written as rows directly. Missing keys become empty cells.

Is my data uploaded?

No. Conversion runs in your browser, so private spreadsheets stay on your device.