JSON to CSV
CSV
JSON
Empty Runs in your browser

CSV to JSON Converter Online - Free & Private

Paste CSV or drop a .csv file and get a JSON array back. The first row becomes the keys, the delimiter is detected for you, and numbers, true/false and empty cells are converted to proper JSON values.

How to convert CSV to JSON

  1. Paste CSV into the left editor, or open or drop a .csv, .tsv or .txt file.
  2. The JSON array appears on the right straight away. With Live off, press Convert or Ctrl+Enter.
  3. Switch the output to tree view to browse the rows, then copy the JSON or download it as a .json file.

How the rows are read

The parser follows RFC 4180, the format Excel and Google Sheets export: quoted fields may contain commas, quotes and line breaks, and doubled quotes inside a field become a single quote. Blank lines are skipped, and a row with more or fewer cells than the header is still converted instead of stopping the whole file. If the CSV cannot be read at all, for example because a quote is never closed, the status line shows the row so you can find it.

With Header row on, the first row supplies the keys and every other row becomes an object. With it off, each row becomes an array of values, which is handy for files that have no header at all.

Options

Example

id,name,active
1,Ada,true
2,Alan,false

becomes [{"id":1,"name":"Ada","active":true},{"id":2,"name":"Alan","active":false}].

Private by design

Your file is read and converted in your browser and is never uploaded. Large exports of a few megabytes convert in well under a second on a typical laptop.

Frequently asked questions

How do I convert CSV to JSON?

Paste CSV into the left editor or open a .csv file. The first row becomes the keys and each other row becomes a JSON object. Copy the JSON array or download it as a .json file.

Does it detect the delimiter?

Yes. With Delimiter set to Detect, it works out whether the file uses commas, semicolons, tabs or pipes. You can also pick one yourself.

Why are my ZIP codes or IDs losing their leading zeros?

Detect numbers turns "007" into the number 7. Turn Detect numbers off to keep every value as a string.

Can I create nested JSON from CSV?

Yes. Turn on Nest dotted keys and a column named address.city becomes {"address": {"city": ...}} in the output.

What if my CSV has no header row?

Turn off Header row and each row becomes an array of values instead of an object.

Editor settings

Type

{
  "id": 1024, "name": "Ada", "active": true,
  "tags": ["0O", "1lI", "=> != >="], "manager": null
}

Colour theme

Code editor

Defaults

Send feedback

How is online-json working for you?